XML Script logo
Example converting UTC timestamps into human readable form
Code

the time() function can be placed in the UTC stamp field. This will return the current day or month etc.

examples
#date_str("%a",945778966)#
#date_str("%S",946512000)#
#date_str("%Y",945817200)#
#date_str("%W",945735780)#
#date_str("%p",945734423)#
#date_str("%m",946425600)#
#date_str("%j",943142400)#
#date_str("%x",30585600)#
#date_str("%Z",2144966400)#

example of multiple formats
#date_str("%A-%B",945778966)#

example of adding some text to the output
#date_str("Day %A Month %B",945778966)#

problems

returns apparently reasonable output
#date_str("%a",sds)#

returns the incorrect format type passed in -- this is acceptable if a format is present
#date_str("%;",2323)#

returns a string of rubbish - not evaluated as changes so will fail test suite
date_str("",2323)
Output

the time() function can be placed in the UTC stamp field. This will return the current day or month etc.

examples
Tue
00
1999
51
AM
12
325
12/21/70
GMT

example of multiple formats
Tuesday-December

example of adding some text to the output
Day Tuesday Month December

problems

returns apparently reasonable output
Thu

returns the incorrect format type passed in -- this is acceptable if a format is present
%;

returns a string of rubbish - not evaluated as changes so will fail test suite
date_str("",2323)
Ref

x.6203

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited