BookmarkSubscribeRSS Feed

The datetime output is identical to that of the E8601DTw.d format except for the T separator.

 

 "yyyy-mm-dd hh:mm:ss.ffffff"  instead of

 "yyyy-mm-ddThh:mm:ss.ffffff"

 

A format generating the same output for date (and time?) variables would be useful too as some tools like Impala can only use timestamps, not dates.

 

I know this can be done using a picture format. Doing so makes the code a lot less portable though.

 

3 Comments
Kurt_Bremser
Super User

I'd suggest an additional moderator in the e8601 formats that controls the "T" character, similar to what can be done with some date formats:

yymmdd10. -> slashes

yymmddp10. -> dots

yymmddn8. -> no separators

 

PS and, oh yeah, the execrable Excel also can't read ISO standard formats. Well, what would one expect ...

ChrisNZ
Tourmaline | Level 20

@Kurt_Bremser I agree. The plethora of 8601 formats could have been created this way as they mostly fiddle with separators and time zones. Not my call and useful either way.:)

 

Lol execrable!

BruceBrad
Lapis Lazuli | Level 10

In many countries, fiscal years are denoted by referring to the two years that they cover. Eg 2001-02, 01-02, 2001/02 or 01/02. A format that output a date as the fiscal year containing it would be very useful. Since fiscal years start at different dates, this could be done for common fiscal years using formats like FY1JulyH7. (1July - start date of fiscal year, H - hyphen separator, 7 or 5 width). Alternatively, a format which mapped 1 January to its corresponding fiscal year.