User bio

The first two systems I worked with using InterSystems technology were a PDP-11 running M11+ and a VAX 11/750 running M/VX. Too many years ago to count! 😊
Since then I've used most, if not all, InterSystems products up to IRIS and HealShare today.
I'm italian living in Switzerland and I work as Senior Consultant at GAIVOTA consultin SA, we provide professional services for InterSystems and other technologies.
Curiosity: apart from DC, I don't have ANY social account! 😁

Show all
Member since Aug 4, 2017
Replies:

ISO 8601 date format is not an accepted format for the SQL DATEPART function.

You can check the supported formats in the DATAPART SQL Documentation.

If I remove the trailing Z (for Zulu / UTC time) and leave the T, DatePart works fine

I'm afraid it does not woks fine:

select 'YEAR: '||DATEPART(YEAR,'2024-06-23T06:03:00') 

result:

YEAR: 1900

Try:

select 'YEAR: '||DATEPART(YEAR,$TRANSLATE('2024-06-23T06:03:00Z','TZ',' '))

In my opinion, if you need to encode a file/stream "as is", without any conversion, so that the counterpart receiver get EXACTLY what your source file/stream is/was, then use %Stream.FileBinary.

If you need some character conversion (say, Unicode/UTF8 or others), then use %Stream.FileCharacter (with appropriate parameters...) that can handle the conversion.

Certifications & Credly badges:
Global Masters badges:
Followers:
Following:
Enrico has not followed anybody yet.