checking if the string can be evaluated as a DATE 
Author Message
 checking if the string can be evaluated as a DATE

in VBScript I would do
if IsDate(myString) then

what do you do in Javascript?
Ziad



Fri, 07 Feb 2003 03:00:00 GMT  
 checking if the string can be evaluated as a DATE

<disclaimer>NOT an expert</disclaimer>

How about

function blnIsDate(strDate) {
   var dteTestDate = Date.parse(strDate);
   if (isNaN(dteTestDate)) {
      return(false);
   }
   else {
      return(true);
   }

Quote:
}

Paul


Sat, 08 Feb 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HOW checking for DATE string ????

2. Check string date format?

3. Evaluating string expression

4. Can strings be evaluated as in Javascript?

5. Type = Date..... checking txt inputs for dates

6. check to see if value is Date

7. Checking a Date

8. Unable to check for date value using RegExp

9. Checking For Valid Dates

10. IsDate - does it check for date validity

11. Date Checking!!

12. Date checking

 

 
Powered by phpBB® Forum Software