Sign in | Join
Last post 06-30-2009 2:51 PM by 2177. 4 replies.
Sort Posts: Oldest to newest Newest to oldest
Hi all-In my asp.net web page, I've a date (which is string) that is mm/yy format. It is credit card expiration date. Now I need to get that string and convert it into date format to get month(like 10) and year (like 2009) at client side using jquery (javascript will do too).
Any ideas ?
Hi,
For date function in Javascript you need date,month and year .. Like this
var dt = document.getElementById('<%= lblDate.ClientID%>').value;
var t = Date.parse(dt);alert(dt);
Thanks
Yes, but I have only month and year to supply to Date function in javascript.
Try to add the date as 1 and generate the whole date ..it will not give error
got it ...thanks