Pierre,

    I'm not so sure what you are asking here but from this statement,

More importantly are there functions in mySQL I can call to convert a
standard date, ie "yyyymmdd" to the expected mySQL value?.

I can tell you that mysql is quite happy to accept yyyymmdd formatted dates
without any modifications.

create table test {
    mytime datetime
};

insert into mytime values('2002-05-12 00:00:00');
*insert into mytime values('2002-05-12');
insert into mytime values('20020512000000');
*insert into mytime values('20020512');

All the above should work though I'm not 100% sure on the * marked ones and
I don't have time to test.


Ric.

p.s. This should work with timestamp typed columns too. I think?


----- Original Message -----
From: "Pierre du Parte" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, May 19, 2002 8:44 AM
Subject: HELP - Insight into dates, please


Excuse this old ACCESS/ CLARION hack for asking such a basic question,
but the mySQL docs have given me a head-ache :-)

I want to move an ACCESS database to mySQL. I am writing the Code in Delphi.

My problem is assigning the date values in the SQL INSERT INTO string.
In the system I'm using dates are returned as REAL numbers and generally
I would format it to suit the occasion, ie
formatdatetime('yyyy-mm-dd',myDate.value).

So, in mySQL

sql := 'INSERT INTO myTable SET myDate = ' + formatdatetime(datemask
,myDate.value);

Looking at the mySQL docs AFAI can work out datemask should be
yyyy-mm-dd but this doesn't work.

what is the expected 'datemask'? Or have I got wrong?

More importantly are there functions in mySQL I can call to convert a
standard date, ie "yyyymmdd" to the expected mySQL value?

Any help to get me over this confusing hump is appreciated.




--
Pierre du Parté
Final Filer Software
349 Worrigee Road
Worrigee, NSW, Australia 2540
http://www.finalfiler.com

Phone 61 2 44216374
Mobile 0413 483 066

"If it feels good, do it!"


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to