954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

ho to change date and time format to insert into database?

hi all;

i have found a code that would generate a time and date, this works fine,
my main goal is i want to change the date and time format.
here is the code that i found,

mysql_query("INSERT INTO mailrecord set date=CURDATE(), time=CURTIME()");


this format will output

CURTIME()  : 14:13:32
            CURDATE() : 2008-08-08


hope anyone can tell me where can i find a good source to output this format

CURTIME()  : 1:13:32pm
          CURDATE() : friday : 08 : 2008
god_1896
Light Poster
39 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Use php's date function.
http://in2.php.net/date

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You