Message Boards Message Boards

GROUPS:

Avoid issue in DateString?

Posted 2 months ago
341 Views
|
1 Reply
|
1 Total Likes
|

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.

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

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