Forum Discussion
Have you seen this documentation on Comparing Two Dates
Yes, but I didn’t see how I could use it. Now() returns date and time, and I need just date (so the last day in the range isn’t omitted), plus I had issues because the dates from Oracle are local date and that gives an error comparing to the Now() date --which must be UTC?
- alchemiz5 years agoContributor III
Hi Wendy,
When invoking date parse and format was not set, it will convert that into UTC, after parsing the 2 dates all of your dates are now set in UTC, removing time or setting it up as 00:00:00 you can invoke the .toLocaleDateString()… then do the date parse again to perform compare dates… see screenshot below
- wpenfold5 years agoContributor
I think that is pretty much exactly what I’m currently doing–converting the dates to strings and then comparing. Note, you can’t use LocaleDateString on an Oracle date datatype (it fails), you have to use toString. I think it is cludgy because what it the point of having date datatypes if you have to convert them to strings to compare them?..which makes me wonder if maybe there is something I am failing to understand about how to work with dates in Snaplogic.