Show Menu
Cheatography

UiPath Date Time Formats Cheat Sheet (DRAFT) by

UiPath Date Time Formats

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Date string

Dateti­me.Now
Datetime variable
Dateti­me.N­ow.To­Str­ing()
“dd/MM­/yyyy hh:mm:ss”

Day Formats

Dateti­me.N­ow.To­Str­ing­(“dd”)
Numerical Day (e.g 09)
Dateti­me.N­ow.To­Str­ing­(“d­ddd”)
Full Day Name (e.g Wednesday)

Month Formats

Dateti­me.N­ow.To­Str­ing­(“MMM”)
Three Char Month (e.g Feb)
Dateti­me.N­ow.To­Str­ing­(“MM”)
Numerical Month (e.g 02)

Year Formats

Dateti­me.N­ow.To­Str­ing­(“y­yyy”)
Full Year (e.g 2024)
Dateti­me.N­ow.To­Str­ing­(“yy”)
Two Char Year (e.g 24)

Convert String to Date

Conver­t.T­oDa­tet­ime­(st­r_I­nput)
str_Input = “12/02­/2024”
Dateti­me.P­ar­se(­str­_Input )
str_Input = “12/02­/2024”

Current Time Format

Dateti­me.N­ow.To­Str­ing­(“h­h:m­m:ss”)
12 hour format
Dateti­me.N­ow.To­Str­ing­(“H­H:m­m:ss”)
24 hour format
Dateti­me.N­ow.To­Str­ing­(“hh”)
12 hour format Hour only
Dateti­me.N­ow.To­Str­ing­(“HH”)
24 hour format Hour only
Dateti­me.N­ow.To­Str­ing­(“mm”)
Current minutes only
Dateti­me.N­ow.To­Str­ing­(“ss”)
Current seconds only
Dateti­me.N­ow.To­Str­ing­(“d­d/M­M/yyyy hh:mm:ss K”)
Current Time with Timezone (e.g 09/10/2024 02:08:02 +01:00)
Dateti­me.N­ow.To­Str­ing­(“d­d/M­M/yyyy hh:mm:ss tt”)
Current time with AM/PM