----- Original Message -----
From: "Victoria Reznichenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 16, 2003 11:48 AM
Subject: Re: Can I change the date format...


> Karam Chand <[EMAIL PROTECTED]> wrote:
> > Is there anyway to change the default date format
> > (possibly in a .ini or .cfg file) from YYYY-MM-DD to
> > another format ? (ie, mm/dd/yyyy or any user-defined
> > format).
>
> No, You can't.
>
> >
> > The useage that I'm looking at is to import a CSV file
> > into a table (using Load data infile .... command)
> > where dates are stored in mm/dd/yyyy format and can
> > change based on the source of the data. I can import
> > the date fields into a char field and then convert it
> > but would like to save the time to transform and copy
> > contents into another table.
>

Victoria's answer is correct. But you can achieve this by using the
DATE_FORMAT() and CONCAT() MySQL functions in a SQL query. This would be a
manual process. Or as you mention you could just do the manual conversion at
the other end.

For example,

- write SQL queries that will export the table data in CVS format using the
DATE_FORMAT and CONCAT() functions
- or, add extra string/char columns to your tables which store the date in
the required format temporarily for the export / import process.




>
> --
> For technical support contracts, goto https://order.mysql.com/?ref=ensita
> This email is sponsored by Ensita.net http://www.ensita.net/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
>  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
>        <___/   www.mysql.com
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
>
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.510 / Virus Database: 307 - Release Date: 14/08/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to