Cicode Programming Reference > Cicode Function Categories > Timestamp Functions Introduction > TimestampCreate

TimestampCreate

Returns a timestamp variable created from the parts.

Syntax

TimestampCreate(INT Year, INT Month, INT Day, INT Hour, INT Minute, INT Second, INT Millisecond [, INT bUtc])

Timestamp:

The timestamp from which the part will be extracted.

Year:

The year part.

Month:

The month part.

Day:

The day part.

Hour:

The hour part.

Minute:

The minute part.

Second:

The second part.

Millisecond:

The millisecond part.

UTC:

Universal Time Co-ordinate (optional):

0 – The given time INTEGER is a local date/time.

1 – The given time INTEGER is a UTC date/time (default).

Return Value

The composed TIMESTAMP variable, or INVALID_TIMESTAMP if invalid

Related Functions

TimestampAdd, TimestampCurrent, TimestampDifference, TimestampSub, TimestampToStr, TimestampFormat, TimestampGetPart, TimestampToTimeInt, TimeIntToTimestamp,

Example

TIMESTAMP timestamp = TimestampCreate(2009, 6, 29, 11, 2, 10, 468);
STRING sTimestamp = TimestampFormat(t1, “dd/MM/yyyy hh:mm:ss.fff”);
// sTimestamp equals ‘29/06/2009 11:02:10.468’

See Also

Timestamp Functions