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

Home > TO_CHAR Function not working for 12/31/1840 in Cache DB

Question
Meenakshi Shanmugam · Jul 15, 2020

TO_CHAR Function not working for 12/31/1840 in Cache DB

Hi,

Below To_Char function is not working as expected

SELECT TO_CHAR('12/31/1840','mm/dd/yyyy') ---01/12/1841

I expect the result to be 12/31/1840. Let me know If there are any suggestion to get the correct result.

Thanks,
Meena

#Databases #Caché

Source URL:https://community.intersystems.com/post/tochar-function-not-working-12311840-cache-db