LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 02-13-2004, 02:15 PM   #1
mnauta
Member
 
Registered: Apr 2003
Location: Austin, TX
Distribution: RH9.0, FC2, Centos
Posts: 146

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.

Thanks
manuel
 
Old 05-13-2004, 08:36 AM   #2
linuxfond
Member
 
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
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Ubuntu, Debian, SuSE, UnSlung, 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,
 
  


Reply


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


All times are GMT -5. The time now is 06:04 AM.

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