Reputation: 105
I want to get current system date in pega (Year-Month-Date)
YYYY-mm-dd
format.
Upvotes: 2
Views: 5696
Reputation: 1
Use this function
@FormatDateTime(@CurrentDateTime(),"MM/dd/yyyy","America/NewYork","en_US")
Upvotes: 0
Reputation: 121
The below, assigned to a Text property, gives date in format yyyyMMdd
:
@(Pega-RULES:DateTime).getCurrentDateStamp()
Adjusting solution given here as below, would give the desired format yyyy-MM-dd
:
@FormatDateTime(@CurrentDateTime(),"yyyy-MM-dd","America/NewYork","en_US")
Tested on Pega Personal Edition 8.6.0 using Operator with Default locale "en_US" and Time zone America/New_York.
Upvotes: 0
Reputation: 105
Using
@(Pega-RULES:DateTime).getCurrentDateStamp()
can get current system date in YYYY-mm-dd(Year-Month-Date) format.
Upvotes: 2