Name.com Cyber Monday sale: $6.99 .com domains and more. Shop the sale.

Convert Date

Spacemail by SpaceshipSpacemail by Spaceship
Namecheap AuctionsNamecheap Auctions
Namecheap AuctionsNamecheap Auctions
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
Close
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
Close
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
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

New: watch any domain
You can now watch domains on NamePros. We check each one and notify you when something changes. Search for a domain and press Watch on...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back