Hi there,
I need to use the date string in format "YMMd", for example, "20220329" for today.
I am using the datetext function: datetext(today(), "YMMd"), if today() function return "03/29/2022", then the datetext(today(), "YMMd") will return "20200328". what's the issue there? why I cant get "20220329"? what's the good way to archive it?
Thanks!
Lin
Discussion posts and replies are publicly visible
FWIW I always seem to have better results using "text()" for these, rather than "datetext()". Also as Princy noted above already, you need to account for GMT conversion - I would suggest trying the same code but with "today()" wrapped in "local()".
Thanks Mike, it's working.
In general, projects will have a global/common rule by APP_returnToday, which wraps the today in local.
If not, today() will give you the last day's date until it passes GMT 12.