dbTalk Databases Forums  

date format

comp.databases.mysql comp.databases.mysql


Discuss date format in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frank
 
Posts: n/a

Default date format - 03-09-2010 , 09:59 PM






Please help an absolute beginner.

Am creating a table that contains a date in mm/dd/yyyy format. Have used
all kinds of combinations on 'date DATE('mm/dd/yyyy')' and am getting
nowhere. What am I doing wrong?

TIA

Reply With Quote
  #2  
Old   
Geoff Muldoon
 
Posts: n/a

Default Re: date format - 03-09-2010 , 10:09 PM






In article <IWDln.9186$NH1.3084 (AT) newsfe14 (DOT) iad>, frank says...
Quote:
Please help an absolute beginner.

Am creating a table that contains a date in mm/dd/yyyy format. Have used
all kinds of combinations on 'date DATE('mm/dd/yyyy')' and am getting
nowhere. What am I doing wrong?
Date data is not stored using a particular format, it is simply stored as
a date data type. In can be extracted from the database and then
displayed in a particular format if you wish.

Geoff M

Reply With Quote
  #3  
Old   
frank
 
Posts: n/a

Default Re: date format - 03-09-2010 , 11:09 PM



On Wed, 10 Mar 2010 14:09:24 +1100, Geoff Muldoon wrote:

Thanks. Just tried the field as date Date and the thing works just
fine.

Thanks again.

Reply With Quote
  #4  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: date format - 03-10-2010 , 09:51 AM



On Wed, 10 Mar 2010 02:59:52 GMT, frank wrote:
Quote:
Please help an absolute beginner.

Am creating a table that contains a date in mm/dd/yyyy format. Have used
all kinds of combinations on 'date DATE('mm/dd/yyyy')' and am getting
nowhere. What am I doing wrong?
Is it stored in a date column? Or a character column of some kind and
you need to SUBSTR it out?

--
It is impossible to sharpen a pencil with a blunt axe. It is equally
vain to try to do it with ten blunt axes instead
--E.W Dijkstra, 1930-2002

Reply With Quote
  #5  
Old   
frank
 
Posts: n/a

Default Re: date format - 03-10-2010 , 10:32 AM



On Wed, 10 Mar 2010 08:51:28 -0600, Peter H. Coffin wrote:

I was going to store it in a DATE column, but you are right. I may be
better off storing it in a string of some sort. The DATE seems to work
for me now.

Reply With Quote
  #6  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: date format - 03-10-2010 , 12:17 PM



frank wrote:
Quote:
On Wed, 10 Mar 2010 08:51:28 -0600, Peter H. Coffin wrote:

I was going to store it in a DATE column, but you are right. I may be
better off storing it in a string of some sort. The DATE seems to work
for me now.
Generally, if you want a date, store it in a DATE column. There are
multiple functions available to extract the date in the format you wish.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #7  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: date format - 03-10-2010 , 04:54 PM



On Wed, 10 Mar 2010 15:32:25 GMT, frank wrote:
Quote:
On Wed, 10 Mar 2010 08:51:28 -0600, Peter H. Coffin wrote:

I was going to store it in a DATE column, but you are right. I may be
better off storing it in a string of some sort. The DATE seems to work
for me now.
uhm, other way around. I wasn't advocating storing it in a string; I'm a
great believer in using DATE for dates.

But you sounded like you were having trouble getting something to
display how you wanted it to from something else, and I was asking what
it was right now so that we could get you to what you want.

--
Either way, it'll remind the clued that there's only one letter
difference between 'turkey' and 'turnkey'.
-- Mike Andrews

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.