User Tools

Site Tools


syntax:functions:format

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
syntax:functions:format [2018/08/18 22:34] dmitrysyntax:functions:format [2019/11/16 14:55] dmitry
Line 1: Line 1:
-===== Format(date_as_number, format) =====+===== format(date_as_number, format) =====
  
-Converts //date_as_number// into a text string according to //format//.+Converts //date_as_number// into a text string according to //format// string.
  
-^  Example  ^  Result +^  Example  ^  Result   Notes  ^ 
-|  format(41640,'yyyyMMdd' |20140101 +|  format(41640,'yyyyMMdd' |20140101  | 41640 corresponds to January 1st, 2014  | 
-|  format(41640,'yy-MM-dd' |14-01-01  |+|  format(41640,'yy-MM-dd' |14-01-01  | 41640 corresponds to January 1st, 2014  |
  
  
 === Format string components === === Format string components ===
-Case-sensitive.+A format string defines a formatting template for dates. Its components can be put together in any combination. If a character doesn't belong to a format component then it's inserted verbatim. 
 + 
 +Note that the colon (":") is not a valid symbol for file names and therefore mustn't be used in file names generated using a format string. 
 + 
 +**Attention** :!: The format components are case sensitive. For instance, "MM" (uppercase) and "mm" (lowercase) are frequently confused by new EasyMorph users but they denote different data/time components (see table below). 
 ^  Character  ^  Description  ^ ^  Character  ^  Description  ^
 |  y  |The year, from 0 to 99.  | |  y  |The year, from 0 to 99.  |
syntax/functions/format.txt · Last modified: 2021/08/30 02:04 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki