Dynadot .com transfer sale, only $10.12 with coupon code DYNA12, available while supplies last, ends October 1, 2026.

Convert Date

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

thestudent

Account Closed
Impact
1
is it possible to convert :

Thurs, 26 March 2009 1:30:11 into 2009-03-26 1:30:11 (standard mysql datetime)


thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I assume you're using PHP?

Use strtotime() to convert it to a Unix timestamp (number of seconds past Jan. 1, 1970, the "Unix Epoch") then use date() to put it into the form you want.

Refer to the PHP manual on these functions if you have questions on how to use them. Good luck!
 
0
•••
Not sure what your mysql db is set up like, but why not try using MySQL itself ;)

Code:
SELECT DATE_FORMAT(date, '%m/%d/%Y') AS formatted_date FROM table;
Where 'date' is the name of the column that contains the datetime/timestamp and of course 'table' being the name of the table you're pulling from.
 
0
•••
Olitt — high-converting AI websites, only from $1/moOlitt — high-converting AI websites, only from $1/mo

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back