11-17-2011 05:47 PM
Anyone have any tricks for Date Calculation with various date formats?
2006.7
Oracle 9i
WAS 5.11
IE6 & IE7
Does anyone have any tricks for trapping the date format before doing any javascript calculations?
we have been using a javascript to calculate the difference between 2 dates ASSUMING that the dates are in MM/DD/YYYY format. Today a customer changed their default date setting to MM.DD.YY and our javascripts errored "nan".
I know that we can recode the javascrip, but I was curious if anyone had any tricks that we could use.
Thank you
Daniel
Safeway Inc.
11-17-2011 05:47 PM
When we run a date calculation on a service we run a check on submit of the service to ensure that the user has not changed their date format from the default, with an error message if they have and we prevent the request from being submitted.
We found that the permutations to allow for different date formats in the calculation would be too complex.
11-17-2011 05:47 PM
We have been using SQL SERVER to get our date differences. We create a data retrieval rule.. here's the sql:
Select DATEDIFF (day,#Dictionary.StartDate#,#Dictionary.EndDate#) as diffdays
diffdays is the number of days between start date and end date
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide