Message Boards Message Boards

1
|
5250 Views
|
1 Reply
|
1 Total Likes
View groups...
Share
Share this post:

Avoid issue in DateString?

Posted 5 years ago

Consider the following code:

DateString[{2000, 1, 1, 0, 0, 0}, {"Year", " ", "Month", " ", "Day", 
      " ", "SecondExact", " "}]

yields

2000 01 01 00.000

but

DateString[{2000,1,1,0,0,0},{"Year"," ","Month"," ","Day"," ","MinuteExact"," "}]

and

DateString[{2000,1,1,0,0,0},{"Year"," ","Month"," ","Day"," ","HourExact"," "}]

yield

2000 01 01 {0., QuantityMagnitude[Minute]}

and

2000 01 01 {0., QuantityMagnitude[Hour]} 

respectively.

It does not seem like the units should be present in the last two cases for Minute and Hour.

POSTED BY: Vincent Virgilio

Please do not use "bug" in subject headers. That status requires confirmation.

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract