v5:reference:connection:sqldate
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:reference:connection:sqldate [2016/01/17 01:22] – ↷ Page moved from v5:reference:sqldate to v5:reference:connection:sqldate mnewnham | v5:reference:connection:sqldate [2016/04/22 03:08] (current) – [Other Periods] mnewnham | ||
---|---|---|---|
Line 9: | Line 9: | ||
</ | </ | ||
===== Description ===== | ===== Description ===== | ||
- | When the function '' | + | When the function '' |
+ | ===== Supported Formats ===== | ||
+ | The following column formats are supported across all databases. Other formats may be supported by certain databases but you should check them for portability. The codes used are based loosely on date formatting for Oracle databases. | ||
+ | ==== Dates ===== | ||
+ | ^Code^Description| | ||
+ | |Y,y|4 Digit Year| | ||
+ | |M|Month of year as a 3 character abbreviation (Jan,Feb etc...)| | ||
+ | |m|Month of year as a 2 digit number 01-12| | ||
+ | |D,d|Day of month as a 2 digit number 01-31| | ||
+ | |||
+ | ==== Times ==== | ||
+ | ^Code^Description| | ||
+ | |H|Hour of day in 24 Hour clock format 00-24| | ||
+ | |h|Hour of day in 12 Hour clock format 00-12| | ||
+ | |i|Minute of hour 00-59| | ||
+ | |A,a|AM/PM , use with **h** hour format| | ||
+ | |||
+ | ==== Other Periods==== | ||
+ | ^Code^Description| | ||
+ | |Q,q|Yearly Quarter| | ||
+ | |w|Day of week as 1 digit number| | ||
+ | |W|Week of the year as a number (1-52)| | ||
+ | |l|Day of week as full word (Monday, Tuesday, etc)| | ||
+ | |||
+ | <WRAP important 100%> | ||
+ | Day of week code ('' | ||
+ | * [[http:// | ||
+ | * MSSQL: not implemented | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | For a portable result, see the [[v5: | ||
+ | </ | ||
===== Usage ===== | ===== Usage ===== | ||
<code php> | <code php> |
v5/reference/connection/sqldate.1452990165.txt.gz · Last modified: 2017/04/21 11:32 (external edit)