create date strict(value a, template b, default c, [Locale d, Timezone e])


Parses a text a using format template b and creates a timestamp from these values.

Description of Parameters


Parameter

Description

a

The text to be interpreted. If a String cannot be interpreted with the format template b, an error occurs and parameter c controls the further behaviour of the function.

b

Format template.

c

(optional) Behaviour of function if the text cannot be parsed as a date. See also parameter a. Default: empty

d

(optional) Locale. Default: System locale. Note: Use the three dots to select a value. Example: de_DE

e

(optional) Timezone. Default: System timezone. Example: UTC

Possible Values for Parameter c


Value

Behaviour of Function

now

The current date will be returned.

empty

The Empty Flag is set. Internally, the field also receives the current date. However, because of the Empty Flag, the value is not visible.

error

The function terminates with an error.

Other value

Instead of the input value, this value will be used. If this text cannot be interpreted with b either, the function will terminate with an error.

Examples


Current date of the example: 2011-10-20 15:33:23.0

The system has the timezone Europe/Berlin.

Note: No date cannot be interpreted as a timestamp with any format template b and thus triggers an error. The further behaviour of the function is then controlled with parameter c.


Parameter a

b

c

d

e

Result

Result of Function get empty flag(a)

241205

ddMMyyHHmm

error

The function terminates with an error.


No date

ddMMyyHHmm

error

The function terminates with an error.


No date

ddMMyyHHmm

now

2011-10-20 15:33:23.0

false

No date

ddMMyyHHmm

empty

See description of empty for parameter c above.

true

No date

ddMMyyHHmm

231010

2010-10-23 00:00:00.0

false

2412050820

ddMMyyHHmm

error

2005-12-24 08:20:00.0

false

241205135

ddMMyyHHmm

error

2005-12-24 13:05:00.0 (note the minute value 5 in parameter a and 05 in the result)

false

1997-07-16T19:20:30Z

(Siehe Formatvorlage W3CDTF)

W3C

now

1997-07-16 21:20:30.0

false

9-дек-2012

d-MMM-yyyy

ru

2012-12-09 00:00:00.0

false

31.03.2024 02:30:00

dd.MM.yyyy HH:mm:ss

The current date with set Empty Flag.

true

31.03.2024 02:30:00

dd.MM.yyyy HH:mm:ss

UTC

2024-03-31 04:30:00.0

false