3

I'm trying to understand datetime strings that look like this:

  • 2019/04/18 0823:40I:45
  • 2019/05/17 0024:23I:53

Most of it is clear, but I can't imagine what the I in the middle represents. Is this a standard datetime format I'm unfamiliar with?

Edit: These values came from a dataset provided by a US-based company, and some of the other data is english text.

  • Where do you get the value from? – Progman Dec 02 '19 at 21:20
  • 1
    It looks like it separating seconds. Perhaps the letter "I" is seconds in some language – James A Mohler Dec 02 '19 at 21:23
  • Give us info where you found things like that. – VillageTech Dec 02 '19 at 21:24
  • You might want read this question: https://stackoverflow.com/questions/8405087/what-is-this-date-format-2011-08-12t201746-384z – Ralph Dec 02 '19 at 21:29
  • 1
    @Ralph No, not relevant. Your linked Question is about standard ISO 8601 formats. This text seen here is *not* in any ISO 8601 format. – Basil Bourque Dec 03 '19 at 02:31
  • 1
    I’ve done a fair amount of date-time handling work. I’ve never seen that format. Seems to be delimiting the hours-minutes from seconds. But very strange. I suggest you educate the publisher of that data about the [ISO 8601](https://en.m.wikipedia.org/wiki/ISO_8601) standard. – Basil Bourque Dec 03 '19 at 02:38

2 Answers2

1

Sometimes, there are letters like T or Z, and for some reason I that I've actually never seen before.

T is used as a literal to separate the date from the time, and Z means "zero hours offset".

It must be something similar to this, maybe "minutes" or "seconds" in another language.

If you don't want to have strings in your dataformat you can use

SimpleDateFormat format = new SimpleDateFormat(
    "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
format.setTimeZone(TimeZone.getTimeZone("UTC"));

(in java, as you haven't specified the language you are using it in), or you can search for something like that!

Hope this helps!

Enrico Cortinovis
  • 811
  • 3
  • 8
  • 31
  • 1
    FYI, the `SimpleDateFormat` class was supplanted years ago by the *java.time* classes with the adoption of JSR 310. You should be using `DateTimeFormatter` instead. – Basil Bourque Dec 03 '19 at 02:32
  • 1
    Never put quote marks around the `Z` in the formatting pattern. That letter is semantic, it means UTC (an offset of zero hours-minutes-seconds). You are throwing away vital information. – Basil Bourque Dec 03 '19 at 02:34
0

It’s no common standard. It is probably a home-grown format.

If the I is always there and always uppercase I, I suggest that you can ignore it provided that you know what the times mean.

I would guess that 0823:40I:45 likely means 08:23:40.450, but without any confirmation I wouldn’t be sure.

A far-fetched guess could be that the letter I refers to the military time zone also known as “India Time Zone” because India is the NATO phonetic I (the zone has noting to do with the country of India). It’s unlikely when your date-time strings come from the US because India Time Zone is +09:00 and therefore far away from the USA. It also would make no sense to put the time zone before the fraction of second (if that is what the last two digits are).

Link: Time Zone Abbreviations – Military Time Zone Names

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161