Pega Expression to take Date from DateTime

 Hi All,

In this blog we will see some of the most frequently used logic in our project. Here our requirement is to get date from given timestamp in format yyyyMMdd.





Param.TimeStamp = 20230721T114545.531 GMT



whatComesBeforeLast(whatComesBeforeLast(Param.TimeStamp,'T'),'T')


Result = 20230721


Store above result in Param.HD1 = 20220420




@(Pega-RULES:String).substring(Param.HD1,((@(Pega-RULES:String).length(Param.HD1))-8),

@(Pega-RULES:String).length(Param.HD1))




Thank you!! Will see you all in next blog post 😊. 

Comments

Popular posts from this blog

pxSubscript and pxListSubscript Properties In Pega

Frequently Used Date Expressions In Pega

pyForEachCount In Pega