Microsoft
Software
Hardware
Network
Question : Problem with ASP script to format a date
Hi,
I have the script below. Which reformats a date entered like 1-1-1 to 01/01/2001
The problem is that sometimes user enters 1-1-1997, it should format it as 01/01/1997 , which is leaving the year as is and not change it to 01/01/2097, the problem is that it DOES reformat it to:
01/01/2097
I need to fix the script so that it only formats the year when user does NOT enter all 4 digits, if user enters 4 digits for the year then it should remain as is. as far as the year is concerned. day and month are ok to be reformatted.
try{tv=this.value;if(tv.su
bstr(6,2)=
='19'){thi
s.value = tv.substr(0,6) + '20' + tv.substr(8,2);}}catch(e){
}" value="<%= (ContactDetails.Fields.Ite
m("PPExpir
eon").Valu
e) %>"
Answer : Problem with ASP script to format a date
Is everything working as is or are you experiencing problems?
Are you using VLans?
What trunk mode is the 3560 set to on the connections to the dell?
What is your usage on the Link to the SGE 2002?
Random Solutions
Reducing bandwidth consumption between domain controllors at multiple sites
Delphi Pagecontrol - each Tabsheet has its own popup menu
DELL LATITUDE D610 80GIG STUCK IN BOOT LOOP
page set up in a word
SQL 2008 Job can't start/stop services
Deploy Printers Using Windows 2008 R2 GPO to Windows XP Pro Clients and Removing all current printers
CodeDom and Windows Forms
Discrete Math, Big O, Little o
How to Setup Mandatory Profiles Server 2008 R2
looking for best web designer.