Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns NULL if value is NULL.

Numbers will be given to a maximum of 6 decimal places. If greater precision is required please use format.

Syntax

toString(value, dateFormat)

ArgumentTypeDescription
valueAnyValue to be converted.
dateFormatStringAn optional parameter which is a date format pattern. PhixFlow will check if the value parameter is a date or can be converted to a date. If the value parameter cannot be converted to a date then an error will be thrown.

If this parameter is not used and a date object is passed into the value parameter, PhixFlow will use the default format of "yyyyMMdd.HHmmss"

Examples

toString(in.value)

...

The following values are available for use in dateFormat patterns:

SymbolMeaningPresentationExamples
GeratextAD
Ccentury of era (>=0)number20
Yyear of era (>=0)year1996
YYyear of era (>=0)year96
YYYYyear of era (>=0)year1996
xweekyearyear1996
wweek of weekyearnumber27
eday of weeknumber2
Eday of weektextTue
EEEEday of weektextTuesday
yyearyear1996
yyyearyear96
yyyyyearyear1996
Dday of yearnumber189
Mmonth of yearmonth7
MMmonth of yearmonth07
MMMmonth of yearmonthJUL
MMMMmonth of yearmonthJULY
dday of monthnumber5
ddday of monthnumber05
ahalfday of daytextPM
Khour of halfday (0~11)number3
KKhour of halfday (0~11)number03
hclockhour of halfday (1~12)number5
hhclockhour of halfday (1~12)number05
Hhour of day (0~23)number6
HHhour of day (0~23)number06
kclockhour of day (1~24)number9
kkclockhour of day (1~24)number09
mminute of hournumber5
mmminute of hournumber05
ssecond of minutenumber7
sssecond of minutenumber07
Sfraction of secondnumber978
ztime zonetextPacific Standard Time; PST
Ztime zone offset/idzone-0800; -08:00; America/Los_Angeles
'escape for textdelimiter
''single quoteliteral'

The number of letters used in the pattern determines the format.

...