You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Datetime Intrinsic Functions - AsDisplayString Method
Convert the variable to a formatted string
Member of Datetime Intrinsic Functions (PRIM_LIBI.IDateTimeIntrinsics)

Parameters

Name

Type

Data Type

Description

Result

*Result (Optional)

String

Resulting string

Format

*Input (Optional)

Enumeration

Format of the datetime

Details


AsDisplayString returns the supplied date formatted using one of the available supplied date formats.

Allowed Formats

Enum Value

Description

CCYYDDMMHHMMSS

e.g. "20143112123456"

CCYYMMDDHHMMSS

e.g. "20141231123456"

HHMMSSbSysFmt6

e.g. "123456 311214""

HHMMSSbSysFmt8

e.g. "123456 31122014"

HHMMSSDDMMCCYY

e.g. "12345631122014"

HHMMSSDDMMYY

e.g. "123456311214"

Localized_SQL

e.g. "2014-12-31 22:34:56.000000000"

Localized_TZ

e.g. "2014-12-31T22:34:56.000000000+10:00"

SQL

e.g. "2014-12-31 12:34:56.000000000"

SysFmt6bHHMMSS

e.g. "311214 123456"

SysFmt8bHHMMSS

e.g. "31122014 123456"

TZ

e.g. "2014-12-31T12:34:56.000000000Z"

Example


In this example, the date and time 2014-12-31 12:34:56 would return the value "20141231123456"
#Result := #Today.AsDisplayString( CCYYDDMMHHMMSS )

See also

All Component Classes
Technical Reference

  • No labels