Jump to content

[SOLVED] Change date string to adapt to existing


coldfission

Recommended Posts

I need to change the date format from a table that got it's date from a different souce. This format looks like this: 6/1/2007 15:26:00

It needs to look like this 2007-06-01 15:26:00.

What PHP function would i use for this and how would it be done? This is the last step to a month long project I have been working on and it needs to be completed very soon. Any help would be appreciated

 

thanks

SELECT SQL_CALC_FOUND_ROWS ID, STR_TO_DATE( modified, '%m/%d/%Y %H:%i:%s' ) AS modified, NULL AS organization, CONCAT( f_name, ' ', l_name ) AS name, address, city, state, zip, country, phone, email, payment_method, total, 'tack-wholesale.com' AS source
FROM tack_orders
WHERE '9999' >= modified
AND modified >= '2005'
AND 100000000000 >= total
AND total >=0
ORDER BY modified ASC
LIMIT 0 , 35

 

This did not return all dates after 2005. How would i get this to work?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.