Can someone explain why datetext() is returning 2022-11-30 given the input of the date 12/1/2022. I came across this thread which states datetext() is no longer supported however it appears within the latest (24.4) All Functions list within Appian. community.appian.com/.../issue-with-using-datetext-function-in-appian-portals
Discussion posts and replies are publicly visible
Perhaps it is due to this: community.appian.com/.../kb-1344-datetext-returns-one-day-before-expected-date
haseeb.shuaib said:datetext() is returning 2022-11-30 given the input of the date 12/1/2022
As noted in Mathieu's link, wrap the date in gmt(). dateText() is formatting the date value stored in the variable which is "12/1 at 12:00 AM GMT", which in any further-west timezone will resolve as sometime on the evening of 11/30.
Hi haseeb.shuaib
If we want to convert date into specific format, then you can also use text() function, but if you want to use datetext() then use gmt() function to convert into timezone, then you will get the expected output.
eg: text( now(), "yyyy-mm-dd")