Sfairadora

  • Reference Guide

date_time_to_str

date_time_to_str(dt)
date_time_to_str(dt, precision)
date_time_to_str(dt, precision, lang)
date_time_to_str(dt, form)
date_time_to_str(dt, form, precision)
date_time_to_str(dt, form, precision, lang)
The function returns the text representation of a date and time. The return value is of the type String.

Parameters

dt
A value of the type Date_time to be converted to string.
precision
An integer number specifying the number of digits to be used in the time format: 0 – h:00, 1 – h:m0, 2 – h:mm, 3 – h:mm:s0…
lang
The value of one of the language constants. It determines the local conventions of date and time format. If no language is specified, the value of the language from the document Settings is used.
form
The formatting string (the type String) used to create the text representation. If it is not specified, the standard formatting string for the language is used. The formatting string is composed of symbols described below.

Formatting String

Symbol
Description
yy
Year; exactly two digits.
yyyy
Year; four digits.
M
Ordinal number of the month.
MM
Ordinal number of the month; always two digits. The values less than 10 have a leading zero.
MMM
Abbreviated name of the month.
MMMM
Full name of the month.
d
Day in month.
dd
Day in month; always two digits.
ddd
Abbreviated name of day of week.
dddd
Full name of day of week.
h
Hours; twelve hour cycle.
hh
Hours; twelve hour cycle, always two digits.
H
Hours; twenty-four hour cycle.
HH
Hours; twenty-four hour cycle, always two digits.
m
Minutes.
mm
Minutes; always two digits.
s
Seconds
ss
Seconds; always two digits.
t
Morning/afternoon indicator (e.g. for English AM/PM).
'xxx'
A constant string xxx.

See Also