Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-13-2004, 02:15 PM   #1
Registered: Apr 2003
Location: Austin, TX
Distribution: Centos 6 / 7
Posts: 149

Rep: Reputation: 15
MySQL date format

On a ColdFusion data entry page I capture a date as: mm/dd/yy.

Then insert it to MySql database. The date is screwed up unless a yyyy/mm/dd date is inserted.

My database/sql knowledge is limted. Can anone tell me a simple way of inserting / converting it from mm/dd/yy to yyyy/mm/dd before inserting it to the database.

Old 05-13-2004, 08:36 AM   #2
Registered: Jan 2003
Location: Belgium
Distribution: Mandrake 9.2
Posts: 475

Rep: Reputation: 30
For ex. today, 13/05/2004, should be entered as 20040513.
Old 05-13-2004, 07:20 PM   #3
Senior Member
Registered: Feb 2003
Location: The Real Washington
Distribution: Debian, Android
Posts: 1,819

Rep: Reputation: 46
I normally have a php script convert date fields into SQL format before inserting them into the database,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
'date' command format Neorio Linux - General 3 01-18-2011 06:18 AM
Thunderbird Date Format dotancohen Linux - Software 9 10-15-2005 03:55 PM
Need workaround for Date Format Cyberdyne Slackware 2 07-22-2005 05:36 AM
Date format Mik LQ Suggestions & Feedback 8 12-05-2004 11:14 AM
Changing date format in MySQL table vous Linux - Software 8 09-03-2003 07:30 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration