dateFormat returns the wrong year

Just found out I had multiple tags report the wrong year (2021 instead of 2020)
I was using
dateFormat(now(),“YYYY-MM-dd”) will return 2021-12-29
dateFormat(now(),“yyyy-MM-dd”) will return 2020-12-29


1 Like

There have been a few posts about this topic here in this last week of 2020. Thanks @gpg for linking this… I bet there are quite a few folks out there with this lurking syntax error–very interesting to learn about the reasoning behind it. The very next thing I checked was whether we have any hints in our documentation to key folks in on this, and thankfully it looks like both dateformat() expression function and call out the behavior on the Week year format! :sunglasses: