Hi All,
I am facing an issue when I'm trying to add hours to the specific time using caladdhours() function. But by defalut it is adding GMT+5:30 to my time.
For example:
Here startdate of datetime type and value is todatetime("01/1/2019 11:07 AM GMT")
and I'm adding two hours to the above mentioned startdate.
caladdhours(datetime(year(ri!startdate),month(ri!startdate),day(ri!startdate),hour(ri!startdate),minute(ri!startdate),second(ri!startdate)),2))
when I use the above function in text component, it is giving me the result as the below screen shot. It is simply adding even +5:30 to my time.
Please suggest the solution to the above mentioned issue.
Thanks & Regards,
Sravani Sarvasiddi.
Discussion posts and replies are publicly visible
Hi Sravani,
Try this gmt(caladdhours(datetime(year(ri!startdate),month(ri!startdate),day(ri!startdate),hour(ri!startdate),minute(ri!startdate),second(ri!startdate)),2),"GMT-05:30")
If this doesn't work check what is time difference between current time and result given by now().
Thanks
Hi Sravani, Hope the below code snippet helps you text( now(), "mmm/dd/yyyy hh:mm:ss AM/PM")
What did now() give you?
Check on Appian Administration Console "Primary time Zone". Check with "always override user selected time" and try now as well.
Hi Sravani, Please try the below code. text(caladdhours(todatetime("01/1/2019 11:07 AM GMT"),2),"mm/dd/yyyy hh:mm AM/PM")
Output : "01/01/2019 06:37 PM" Note: Tested timezone is ISTHope this helps :)