Message Boards Message Boards

GROUPS:

How can I turn off Units in DateDifference and similar functions?

Posted 9 years ago
4861 Views
|
2 Replies
|
4 Total Likes
|

Hello everyone

Is there any way to turn off units in DateDifference, so that the answer it returns is a number? Otherwise, the results of DateDifference cannot be used in statements such as

IntervalMemberQ[Interval[{360, 370}], myDateDiff]

without wrapping Interval in Quantity as

Quantity[Interval[{360, 370}],"days"]

It would a pain to have to go back and change a lot of my old scripts.

Regards,

Gregory

POSTED BY: Gregory Lypny
2 Replies

Thanks Isaac,

Much obliged.

POSTED BY: Gregory Lypny

The legacy output without units is possible by SetSystemOptions. Please see DateDifference/Possible Issues

POSTED BY: Isaac Abraham
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