Skip to main content
All CollectionsWrk Action LibraryDate & Time
Convert format of date or time
Convert format of date or time
Wrk Product avatar
Written by Wrk Product
Updated over a year ago

Converts the format of a provided date and/or time format into a specific date & time format.

Common use cases

  • Data manipulation Wrkflows

  • Time management

Application

  • Date & Time

Inputs (what you have)

NAME

DESCRIPTION

TYPE

REQUIRED

EXAMPLE

Date and/or time

Date/Time to be converted

Number

Yes

14 02 22, 13:53

Expected format

Format to convert the provided date/time

Number

Yes

MM/DD/YYYY

Current date/time format

The current format of the provided date/time

Number

Yes

DD MM YY

Number of digits

The number of digits required if converting to Unix Epoch Timestamp

Number

No

13 if 2022-05-01 is equivalent to 1651377600, then three more zeroes need to be added to then end of the timestamp: 1651377600000

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data Library. These variables in the Data Library are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NAME

DESCRIPTION

TYPE

REQUIRED

EXAMPLE

Converted date/time

Converted date/time

Text

Yes

02/23/2022

Statuses

NAME

DESCRIPTION

Success

This status is selected if the date or time was successfully converted onto the specified format, and the provided link can be used to directly access the file

Unsuccessful

This status is selected in the event of the following scenarios:

- The date and time are not provided

- The preferred format or current format is not provided

- The instructions cannot be followed

How it works

  • Convert Date and time: 14 02 22, 13:54, into Date/Time format: mm/dd/yyyy, hh:mm

  • The specified Date and time: 14 02 22, 13:54 is then formated into the the specified format

  • The calculated result is 02/14/2022 13:54

Year Formats:

Key

Description

Example

yyyy

Year (4 digits)

2023

yy

Year (2 digits)

23

Month Formats:

Key

Description

Example

MMMM

Full month name

October

MMM

Abbreviated month name

Oct

MM

Month (2 digits)

10

M

Month (1 or 2 digits)

10

Day formats:

Key

Description

Example

dd

Day of the month (2 digits)

16

d

Day of the month (1 or 2 digits)

16

J

Day of the year (1 to 3 digits)

289

Week Formats:

Key

Description

Example

F

Day of the week (0 to 6)

0

EEEE

Full weekday name

Sunday

E

Abbreviated weekday name

Sun

W

Week number of the year

41

w

Week number of the year (1 digit)

41

Hour Formats (12 Hr):

Key

Description

Example

hh

Hour (12-hour format, 2 digits)

03

h

Hour (12-hour format, 1 or 2 digits)

3

Hour Formats (24 Hr):

Key

Description

Example

HH

Hour (24-hour format, 2 digits)

15

H

Hour (24-hour format, 1 or 2 digits)

3

Minute Formats:

Key

Description

Example

mm

Minute (2 digits)

05

m

Minute (1 or 2 digits)

5

Second Formats:

Key

Description

Example

SSS

Milliseconds (3 digits)

123

ss

Second (2 digits)

45

s

Second (1 or 2 digits)

5

Timezone and AM / PM:

Key

Description

Example

zzz

Timezone

UTC

a

AM/PM indicator

AM

Requirements

  • N/A

Did this answer your question?