List:General Discussion« Previous MessageNext Message »
From:Fredrick Bartlett Date:February 10 2003 2:51am
Subject:Re: Date Conversion with UltraDev (ASP)
View as plain text  
With UltraDev you still have to call some javascript.
Here is a couple of examples...

function MySQLDateToday(){
 var tDate = new Date();
 year = tDate.getFullYear();
 month = tDate.getMonth() + 1;
 if (month < 10)
  { month = "0" + month; }
 day = tDate.getDate(); //getDate is day of month, go figure!!!
 if (day < 10)
  { day = "0" + day; }

 rDate = year + "-" + month + "-" + day;
 return rDate
}

function MySQLDateEdit(myDate){
 var dArray = myDate.split("/");//myDate.split(myDate,"/");
 var rDate = dArray[2]+"-"+dArray[0]+"-"+dArray[1];//MM/DD/YYYY
 return rDate
}


----- Original Message -----
From: "Dana Shields" <danashields@stripped>
To: <mysql@stripped>
Sent: Friday, February 07, 2003 5:13 PM
Subject: Date Conversion with UltraDev (ASP)


> I am using MySQL with Ultradev (asp server model), and I'm creating a
> recordset insert form; however, the documenation is obvious that the user
> has to enter the date in yyyy-mm-dd format. However, this will not work
for
> my users, and I need to allow them to enter mm/dd/yyyy or even mm/dd/yy
> format.
>
> Does anyone know of an ultradev extension (for ASP) that will convert to
the
> MySQL date format? This is easily handled with MS Access and SQL Server,
so
> hopefully there's something out there that does this as well.
>
> If anyone thinks this posting is misplaced and should be in an Ultradev
> list, please feel free to let me know.
>
> Thank you.
>
> Dana
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <mysql-thread131876@stripped>
> To unsubscribe, e-mail
<mysql-unsubscribe-palmtreeFRB=earthlink.net@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


Thread
Date Conversion with UltraDev (ASP)Dana Shields8 Feb
  • Re: Date Conversion with UltraDev (ASP)pazenko9 Feb
  • Re: Date Conversion with UltraDev (ASP)Fredrick Bartlett10 Feb