Scott Haneda <[EMAIL PROTECTED]> wrote on 03/09/2005 08:51:43 PM:

> Mysql 4, I have datetime field set of 0000-00-00 00:00:00
> 
> Sampling of data I need to insert in is as follow:
> 12/26/04 13:35
> 12/25/04 12:41
> 12/25/04 8:53
> 
> How do a massage that to the proper format YYY-MM-DD HH:MM:SS
> 
> thanks
> -- 
> -------------------------------------------------------------
> Scott Haneda                                Tel: 415.898.2602
> <http://www.newgeo.com>                     Fax: 313.557.5052
> <[EMAIL PROTECTED]>                          Novato, CA U.S.A.
> 

Scott,

If you are going to continue to work with databases, you need to learn the 
vocabulary of a DBA.

You said:I have datetime field set of 0000-00-00 00:00:00

Possible translations:
A) I have a table with a datetime field where every value in that field is 
'0000-00-00 00:00:00'

B) I have a single record with a datetime field whose value is '0000-00-00 
00:00:00'

C) I have a field declared as a SET with the value of '0000-00-00 
00:00:00'

D) I have a table with a datetime field whose default value is '0000-00-00 
00:00:00'

You said:Sampling of data I need to insert in is as follow

Possible translations:
A) I have some data I need to update my existing records with

B) I have some data I need to add to my table

C) I have several values that I want to cram into a single field

D) I have new data that needs to be added as a new column to the records 
in an existing table

Please try to rephrase your problem using more precise terms. I can see 
one problem already, some TIMESTAMP fields are automatically filled in 
with a value EACH TIME a record is modified by the server (RTFM for 
details). If you want to store date and/or time information in a field and 
you do not want to worry about it being overwritten during the next 
UPDATE, use a DATETIME column.

ALSO!! The methods available to you to change dates from one format to 
another depends ENTIRELY (completely, absolutely) on HOW you are moving 
that data into your MySQL server. Please describe the entire process (as 
you planned it) including the data source and what OS you are using.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to