[PHP] Formatting Dates in Form before submit

2001-08-27 Thread Traci P Sumpter
Can anyone tell me how to use the strtotime function within the on change event of a text box?? I need to format the date before submit the form because once it submits it dynamically creates a SQL statement. Is it best to use vbscript or Jscript and if so how? Thanks in advance. -- PHP

[PHP] Formatting Dates

2001-03-08 Thread stas
Hello, How can I format a date stored in the database in a Date field. It's in this format: -mm-dd I understand that date() function only works for current system date/time. I am looking for something like this: dateformat($date, "mask"), sort of like the one in ColdFusion. Thanks much!

Re: [PHP] Formatting Dates

2001-03-08 Thread Joe Sheble (Wizaerd)
You could use the mySQL function DATE_FORMAT() in your query string.. SELECT DATE_FORMAT( DateAdded, '%m/%d/%Y' ) as d_Added FROM myDB At 12:52 PM 1/8/01 -0500, stas wrote: Hello, How can I format a date stored in the database in a Date field. It's in this format: -mm-dd I understand