我有這個字符串變量後解析日期字符串
'03/21/2011'
我需要通過PHP解析它,把它變成這種格式
'2011-03-21'
我使用PHP和我需要這個格式,所以如果你想處理在PHP我可以運行此查詢
SELECT prospect as 'Prospect', company as 'Company', industry as 'Industry', created_at as 'Original Date Submitted', software as 'Software', warm_transfer as 'Warm Transfer', UserName as 'Sales Rep' FROM mercury_leads join user on UserID=user_id WHERE created_at BETWEEN '2011-01-01' AND '2011-03-22'
的可能重複的[的strtotime失敗上MM-DD-YYYY HH:MM] (http://stackoverflow.com/questions/5133703/strtotime-failing-on-mm-dd-yyyy-hhmm) – Gordon 2011-03-23 17:55:29
,你可以通過使用搜索功能找到一對[其他重複] [http:// stackoverflow .com/search?q = format + date + [php]) – Gordon 2011-03-23 17:56:25