Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Community Member

Anyone have any tricks for Date Calculation with various date formats?

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.

Everyone's tags (1)
2 REPLIES
Community Member

Anyone have any tricks for Date Calculation with various date fo

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.

Community Member

Anyone have any tricks for Date Calculation with various date fo

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

185
Views
0
Helpful
2
Replies
CreatePlease to create content