4D v16DATE_TO_CHAR |
||||||||||||||
|
4D v16
DATE_TO_CHAR
DATE_TO_CHAR
The DATE_TO_CHAR function returns a text representation of the date passed in the first arithmetic_expression according to the format specified in the second arithmetic_expression. The first arithmetic_expression should be of the Timestamp or Duration type and the second should be of the Text type. The formatting flags which can be used are given below. In general, if a formatting flag starts with an upper-case character and produces a zero, then the number will start with one or more zeros when appropriate; otherwise, there will be no leading zeros. For example, if dd returns 7, then Dd will return 07. The use of upper- and lower-case characters in the formatting flags for day and month names will be reproduced in the results returned. For example, passing "day" will return "monday", passing "Day" will return "Monday" and passing "DAY" will return "MONDAY". am - am or pm according to the value of the hour d - numeric day of week (1-7) hh - numeric hour, 12-based (0-11) J - Julian day mi - minutes (0-59) q - year's quarter ss - seconds (0-59) w - week of month (1-5) yy - year [any text] - text inside brackets ([ ]) is not interpreted and inserted as is This example returns the birth date as a numeric day of the week (1-7): SELECT DATE_TO_CHAR (Birth_Date,’d’)
|
PROPERTIES
Product: 4D
HISTORY
ARTICLE USAGE
4D SQL Reference ( 4D v16) |
||||||||||||