Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting a string to a date
Message
From
21/05/2003 11:33:50
Fabian Belo
Independent Developer
Argentina
 
 
To
20/05/2003 09:53:51
Philip Jones
Cornwall County Council
Truro, United Kingdom
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00790426
Message ID:
00791110
Views:
15
Philip;

The simplest way to do it is by creating a date var:
var str1 = '06/26/2003';
var res1 = new Date(str1);
You also might take a look at the Date.Parse() Method.



>Hi,
>I want to validate a date so that I can be sure that the user hasn't entered a future date.
>The date is held in 3 fields. One holds the day, one the month and the other the year.
>If I concatenate the values of the fields with "/" so that I get a string with (for example) "23/06/2003" how can I than convert it to a date so that I can check it against the current date?
"Since I've read that alcohol is bad... I quit reading."
Me


http://www.fabianbelo.com.ar
Previous
Reply
Map
View

Click here to load this message in the networking platform