How Do You Convert A String To Date »  Show posts from    to     

Icy Phoenix


Old Customizations - How Do You Convert A String To Date



AndyGpy [ Tue 21 Jul, 2009 22:47 ]
Post subject: How Do You Convert A String To Date
Hi Guys,

I have a string eg - 21/07 which represents a date, i need to upload it to a database in 21/07/09 format, how can i do this with PHP, i know how to update the database, but how do i convert string ( eg 21/07) to a date format ( dd/mm/yy )

regards


KugeLSichA [ Wed 22 Jul, 2009 08:26 ]
Post subject: Re: How Do You Convert A String To Date
hey andy,

if you want to have the date for IcyPhoenix... its better to note convert the string in a date... its better to use the UNIX timestamp... then you can call the timestamp with the create_date_ip() function from Icy...

this might be helpfull for you http://www.php.net/manual/en/function.strtotime.php


Mighty Gorgon [ Wed 22 Jul, 2009 12:35 ]
Post subject: Re: How Do You Convert A String To Date
Better than thousands words:

http://it2.php.net/manual/en/function.date.php

http://it2.php.net/manual/en/function.gmdate.php

http://it2.php.net/manual/en/function.mktime.php

http://it2.php.net/manual/en/function.gmmktime.php


AndyGpy [ Wed 22 Jul, 2009 23:33 ]
Post subject: Re: How Do You Convert A String To Date
Thanks guys, got that sorted and now having problems with something else to worry about LOL

Ahhh the joys of writing code !!




Powered by Icy Phoenix