Convert date and time into CCYYMMDDHHMMSS
How to convert date and time into CCYYMMDDHHMMSS format??
For example the date and time format is 12/10/2019 21:41
Discussion (6)0
Comments
Hi,
Have a look this link
https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=R…
Best regards,
Kurro Lopez
Thankyou Lopez..
write $translate($zdt($h,8)," :")
20201231090429
Thankyou Robert
If your input (date and time) format is the same as the example you provided,
set inpDateTime = "12/10/2019 21:41"then use this one:
write $tr($zdt($zdth(inpDateTime,1,2),8,1),": ") --> 20191210214100and if you want it "a little bit faster", the try this one
write $tr("abcdefghijkl00","ef/gh/abcd ij:kl",inpDateTime) --> 20191210214100and you will get a speed gain of over 33%
Happy New Year!
(But this time, without Covid-19, if possible!)
Thankyou Julius..
Happy New year !