Aging water pipe networks hinder efficient management of important water service indices such as revenue water and leakage ratio due to pipe breakage and malfunctioning of pipe appurtenance. In order to control leakage in water pipe networks, various methods such as the minimum night flow analysis and sound waves method have been used. However, the accuracy and efficiency of detecting water leak by these methods need to be improved due to the increase of water consumption at night. In this study the Principal Component Analysis (PCA) technique was applied to the night water flow data of 426 days collected from a water distribution system in the interval of one hour. Based on the PCA technique, computational algorithms were developed to narrow the time windows for efficient execution of leak detection job. The algorithms were programmed on computer using the MATLAB. The presented techniques are expected to contribute to the efficient management of water pipe networks by providing more effective time windows for the detection of the anomaly of pipe network such as leak or abnormal demand.