File size: 3,593 Bytes
4c86203
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Name	Description
age(timestamp, timestamp)	Subtract arguments, resulting in the time difference between the two timestamps.
age(timestamp)	Subtract from current_date.
century(timestamp)	Extracts the century of a timestamp.
current_timestamp	Returns the current timestamp (at the start of the transaction).
date_diff(part, startdate, enddate)	The number of partition boundaries between the timestamps.
date_part([part, ...], timestamp)	Get the listed subfields as a struct. The list must be constant.
date_part(part, timestamp)	Get subfield (equivalent to extract).
date_sub(part, startdate, enddate)	The number of complete partitions between the timestamps.
date_trunc(part, timestamp)	Truncate to specified precision.
datediff(part, startdate, enddate)	Alias of date_diff. The number of partition boundaries between the timestamps.
datepart([part, ...], timestamp)	Alias of date_part. Get the listed subfields as a struct. The list must be constant.
datepart(part, timestamp)	Alias of date_part. Get subfield (equivalent to extract).
datesub(part, startdate, enddate)	Alias of date_sub. The number of complete partitions between the timestamps.
datetrunc(part, timestamp)	Alias of date_trunc. Truncate to specified precision.
dayname(timestamp)	The (English) name of the weekday.
epoch_ms(ms)	Converts ms since epoch to a timestamp.
epoch_ms(timestamp)	Converts a timestamp to milliseconds since the epoch.
epoch_ms(timestamp)	Return the total number of milliseconds since the epoch.
epoch_ns(timestamp)	Return the total number of nanoseconds since the epoch.
epoch_us(timestamp)	Return the total number of microseconds since the epoch.
epoch(timestamp)	Converts a timestamp to seconds since the epoch.
extract(field FROM timestamp)	Get subfield from a timestamp.
greatest(timestamp, timestamp)	The later of two timestamps.
isfinite(timestamp)	Returns true if the timestamp is finite, false otherwise.
isinf(timestamp)	Returns true if the timestamp is infinite, false otherwise.
last_day(timestamp)	The last day of the month.
least(timestamp, timestamp)	The earlier of two timestamps.
make_timestamp(bigint, bigint, bigint, bigint, bigint, double)	The timestamp for the given parts.
make_timestamp(microseconds)	The timestamp for the given number of µs since the epoch.
monthname(timestamp)	The (English) name of the month.
strftime(timestamp, format)	Converts timestamp to string according to the format string.
strptime(text, format-list)	Converts the string text to timestamp applying the format strings in the list until one succeeds. Throws an error on failure. To return NULL on failure, use try_strptime.
strptime(text, format)	Converts the string text to timestamp according to the format string. Throws an error on failure. To return NULL on failure, use try_strptime.
time_bucket(bucket_width, timestamp[, offset])	Truncate timestamp by the specified interval bucket_width. Buckets are offset by offset interval.
time_bucket(bucket_width, timestamp[, origin])	Truncate timestamp by the specified interval bucket_width. Buckets are aligned relative to origin timestamp. origin defaults to 2000-01-03 00:00:00 for buckets that don't include a month or year interval, and to 2000-01-01 00:00:00 for month and year buckets.
to_timestamp(double)	Converts seconds since the epoch to a timestamp with time zone.
try_strptime(text, format-list)	Converts the string text to timestamp applying the format strings in the list until one succeeds. Returns NULL on failure.
try_strptime(text, format)	Converts the string text to timestamp according to the format string. Returns NULL on failure.