Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Force YYYY format

Question
Nezla · Sep 8, 2021

Force YYYY format

Hi Guys,

when using $ZD(mydate,4) sometimes it returns year as 4 digits and sometimes two, and the documentation is saying ([YY]YY is a two-digit year if hdate falls within the active window for two-digit years; otherwise it is a four-digit year), what active window for two means and how can I force the year to be always 4 digits ?

 

Thanks

#Ensemble
Product version: Caché 2014.1

Source URL:https://community.intersystems.com/post/force-yyyy-format