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

Convert Date

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

We're social

Escrow.com
Spaceship
Escrowly
CryptoExchange.com
Domain Recover

NamePros updates

Parking: find your domains by pasting a list
You can now paste a list of domain names into the search box at the top of the Parking menu. Put one name on each line. Your domain list...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back