From: | Gonzo Rock <GonzoRock(at)Excite(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Date Time Functions - ANSI SQL ? |
Date: | 2001-07-30 04:19:11 |
Message-ID: | 3.0.5.32.20010729211911.00c8cec0@postoffice.pacbell.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Curious to know...
Are all the date time functions described in the pgSQL docs are ANSI-SQL or pgSQL extensions?
For Example in the Docs:
------------------------
4.7.1. EXTRACT, date_part
EXTRACT (field FROM source)
The extract function retrieves sub-fields from date/time values, such as year or hour. source is a value expression that evaluates to type timestamp or interval. (Expressions of type date or time will be cast to timestamp and can therefore be used as well.) field is an identifier (not a string!) that selects what field to extract from the source value. The extract function returns values of type double precision. The following are valid values:
day
The day (of the month) field (1 - 31)
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 16
Thanks all,
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-07-30 05:39:25 | Re: Date Time Functions - ANSI SQL ? |
Previous Message | Bruce Momjian | 2001-07-30 03:38:22 | Re: Who do I make _ not a wildcard? |