PDA

View Full Version : Question about comparing dates


cchian
07-25-2002, 04:34 PM
Do I need to convert dates (MM/DD/YYYY) to julian dates before doing some simple logic like: If today's date is earlier than "this date", then show/do this. This was not possible in v3.0. With the 10-day time limit of the current beta, I am affraid of changing my system clock too far.

Lorne
07-25-2002, 04:50 PM
It depends on what you want to do.

Julian dates are the easiest to compare, of course, and they are great when you need to perform calculations (like subtracting the build date from the current date to see if more than 40 days have passed).

You can also perform comparisons on ISO dates, although if you need to do any arithmetic on them you'll need to break the YYYY, MM and DD parts apart first. (Tip: use a Get Delimited String action for this.)

Lorne
07-25-2002, 04:52 PM
For simple date comparisons like "is today's date past Aug 1, 2002", either of the naturally sortable date formats will do (ISO Date and Julian date).

In that case, it's essentially just a string comparison.