DATETIME2STR

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Convert iProcess Engine date and time format to the given format.

Syntax

DATETIME2STR (date, time, format)

where:

date is a date to be converted to the format.

time is a time to be converted to the format.

format is a text string containing the required conversion format.

The following table lists few example date time formats.

Date Time Format

Example

%Y-%m-%dT%H:%M:%S

1992-10-19T08:22:45

%Y-%m-%d,%H:%M:%S

1992-10-19,08:22:45

%Y-%m-%d %H:%M:%S

1992-10-19 08:22:45

%Y/%m/%d %H:%M:%S

1992/10/19 08:22:45

%d-%m-%Y %H:%M

19-10-1992 08:22

%d-%b-%Y %H:%M

19-Oct-1992 08:22

The following table lists the allowed date time specifiers and their meaning.

Specifier

Meaning

%a

Name of the day of the week, can be a full name or an abbreviation

%A

Same as %a

%b

Month name, can be a full name or an abbreviation

%B

Same as %b

%c

Date or time, in the format of the locale

%C

Century number [00–99]. Calculates the year if a 2-digit year is used

%d

Day of the month [1–31]

%D

Date format, same as %m/%d/%y

%e

Same as %d

%g

2-digit year portion of ISO week date [00–99]

%G

4-digit year portion of ISO week date. Can be negative

%h

Same as %b

%H

Hour in 24-hour format [0–23]

%I

Hour in 12-hour format [1-12]

%j

Day of the year [1-366]

%m

Month [1-12]

%M

Minute [0-59]

%y

2-digit year [0-99]

%Y

4-digit year. Can be negative

Note: As iProcess does not include seconds in its time, the HH:MM:SS format always returns HH:MM:00.

Returns

A formatted string with date and time format mentioned in format.

Example

This example returns !19/10/1992!, #08:23# in ”%Y-%m-%dT%H:%M:%S” format.

DATETIME2STR (!19/10/1992!, #08:23#, ”%Y-%m-%dT%H:%M:%S”)

returns "1992-10-19T08:23:00"