create date strict(value a, template b, default c)


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. Note: Instead of a String (intended use) a Date or Timestamp object is also tolerated here (even if this makes the use of the function pointless), but then parameter b must remain empty. Note: If a String cannot be interpreted with the format template b or if a Date or Timestamp object has an Empty Flag, an error occurs and parameter c controls the further behaviour of the function.

b

Format template.

c

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

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

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

Parameter b

Parameter c

Result

Result of Function is empty(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