Reputation: 691
I have a date-time string like 2013-10-23 10:10:04.0
. I'm kind of confused by what the extra zero signifies at the end of the string?
Does it denote the time zone or something else? I saw documentation on the different characters for the Java DateTime format, but I'm not sure what it is in the string above?
Upvotes: 0
Views: 110
Reputation: 95558
It's milliseconds.
The format for the date is yyyy-MM-dd HH:mm:ss.S
, where S
is the millisecond.
So .002
would be two milliseconds and .200
would be two hundred milliseconds.
Upvotes: 2
Reputation: 4041
Ussually, the date time format is denoted by
yyyy-MM-dd HH:mm:ss.S where S (the last part of the format) are the milliseconds, in this case, .2 whould be 200 milliseconds.
Taje a look at SimpleDateFormat docs, and the patterns
Upvotes: 3