Forum Statistics

  • Forum Members: 4,502
  • Total Threads: 3,657
  • Total Posts: 2
There are 1 users currently browsing forums.

Partner Sites

Reply
Old 05-16-2009, 04:21 AM   #1 (permalink)
 
Status: Newbie
Join Date: May 2009
Posts: 3

Rep Power: 13 madar1985 is on a distinguished road



Default Convert different date formats to yyyy-mm-dd

Hello. Newbie asking for help on converting date formats. I have a working uery that will convert a date format from mm/dd/yyyy to yyyy-mm-dd. I need to be able to convert to yyyy-mm-dd the variations that occur when the months and days are single digits and the year is 2 digits (m/dd/yyyy, m/d/yyyy, mm/d/yyyy, m/d/yy, mm/d/yy, m/dd/yy, m/d/yy, etc.). Here is the code I have so far:

PHP Code:
mysql_query("UPDATE compsin SET date = CONCAT(SUBSTRING(date, 7, 4),'-',SUBSTRING(date, 1, 2),'-',SUBSTRING(date, 4, 2))"); 

Thanks in advance.
__________________
Best Diet Pills Address
madar1985 is offline Add Infraction for madar1985   Reply With Quote
Old 05-25-2009, 04:11 AM   #2 (permalink)
 
Status: Newbie
Join Date: Jan 2009
Posts: 5

Rep Power: 14 devunion is on a distinguished road



Default

Why you can't do this work on PHP side? It will be easier to handle different formats on PHP.
__________________
Welcome to HighProg.com - Freelancer's world-wide portal
devunion is offline Add Infraction for devunion   Reply With Quote


Reply

Bookmarks

Tags
None


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.5.0 RC2