Incorrect Date to date time property conversion

I have date property whose value get set to another datetime property. Date time property value get the time GMT and shows one day less.

Server is on EST time zone

For example:

DateProp Property = 20210430

Do a property set to DateTimeProp = DateProp

Value of DateTime Prop = 20210430T000000.000 GMT which is nothing but 20210429 in eastern time.

Since server is in eastern time zone, it should convert the date to datetime equivalent is EST.

Is there way to achieve this?

@KAILASHC

Can this be helpful: How to convert Date to DateTime format | Support Center

@KAILASHC Can you try using the below function for DateTime conversion and let me know if that works.

FormatDateTime(@DateTime.CurrentDateTime(),DDmmYYYYThhMMss,EST,“”)

Thanks

@KAILASHC

Update on this thread, I was able to achieve desired results by using function below

@(Pega-RULES:DateTime).pxGetSpecifiedTimeOnDate(InputDate,0,0,0,“America/New_York”)