User Tools

Site Tools


syntax:functions:date

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
syntax:functions:date [2023/11/24 21:00] – [Arguments] craigtsyntax:functions:date [2023/11/24 21:06] (current) – [Examples] craigt
Line 56: Line 56:
 If a time value is used for the //datetime// argument, the return value will use today's date for the date component. If a time value is used for the //datetime// argument, the return value will use today's date for the date component.
  
 +While it can be convenient, in some cases, to omit the //format//, it is recommended to specify the date format explicitly, when possible, to ensure deterministic behavior.
 \\  \\ 
 =====Examples===== =====Examples=====
Line 67: Line 68:
  
   date('20140101','yy-MM-dd') //Returns #Can't convert to date (Invalid format)   date('20140101','yy-MM-dd') //Returns #Can't convert to date (Invalid format)
 +
 +  date('2023-Nov-4') //(Omitted format) Returns 45234
 +  
  
 \\  \\ 
syntax/functions/date.txt · Last modified: 2023/11/24 21:06 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki