aboutsummaryrefslogtreecommitdiffstats
path: root/include/dblayer/functions_pgsql.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/dblayer/functions_pgsql.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/dblayer/functions_pgsql.inc.php b/include/dblayer/functions_pgsql.inc.php
index 6492e82ef..8a300b7ad 100644
--- a/include/dblayer/functions_pgsql.inc.php
+++ b/include/dblayer/functions_pgsql.inc.php
@@ -544,6 +544,11 @@ function pwg_db_get_recent_period($period, $date='CURRENT_DATE')
return $d;
}
+function pwg_db_get_hour($date)
+{
+ return 'EXTRACT(HOUR FROM '.$date.')';
+}
+
function pwg_db_get_date_YYYYMM($date)
{
return 'TO_CHAR('.$date.', \'YYYYMM\')';