By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,956 Members | 1,683 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,956 IT Pros & Developers. It's quick & easy.

converting "dd-mm-yyyy" to "yyyy-mm-dd"

P: n/a
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark
Jul 19 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
First, shouldn't your mysql date field be a date field and not a varchar
field?
If it was, you don't have to export it...
instead, from within access, use odbc to link to your mysql table.
then do an append to table query to append the data from access table to
mysql table.

(one suggestion)

"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #2

P: n/a
First, shouldn't your mysql date field be a date field and not a varchar
field?
If it was, you don't have to export it...
instead, from within access, use odbc to link to your mysql table.
then do an append to table query to append the data from access table to
mysql table.

(one suggestion)

"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #3

P: n/a
First, shouldn't your mysql date field be a date field and not a varchar
field?
If it was, you don't have to export it...
instead, from within access, use odbc to link to your mysql table.
then do an append to table query to append the data from access table to
mysql table.

(one suggestion)

"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #4

P: n/a
Erik,

In Access 2002, in the design view, there is a property for the format of
each field. If you right-click on that property, there should appear a
dropdown box, with a selection of alternate formats, for that data type. If
it is not what you want, you can specifiy "YYYY-MM-DD",
(I believe if you use lower case 'mm', you will get minutes).
Best Regards,
Dana
"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #5

P: n/a
Erik,

In Access 2002, in the design view, there is a property for the format of
each field. If you right-click on that property, there should appear a
dropdown box, with a selection of alternate formats, for that data type. If
it is not what you want, you can specifiy "YYYY-MM-DD",
(I believe if you use lower case 'mm', you will get minutes).
Best Regards,
Dana
"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #6

P: n/a
Erik,

In Access 2002, in the design view, there is a property for the format of
each field. If you right-click on that property, there should appear a
dropdown box, with a selection of alternate formats, for that data type. If
it is not what you want, you can specifiy "YYYY-MM-DD",
(I believe if you use lower case 'mm', you will get minutes).
Best Regards,
Dana
"Erik R.N." <fo**************@c.dk> wrote in message
news:40***********************@dtext01.news.tele.d k...
Hi
I have a ACCESS2002 table with a date-field in format "dd-mm-yyyy"
which I "export" to a txt-file ( ; and " " )
and upload the txt-file to a MYSQL-table
where the datefield is a varchar-field.
I want to sort on the MYSQL-date-field.
How do I get a MYSQL-date-formated "yyyy-mm-dd" field
which I can sort on ??
--
Erik RN
Denmark

Jul 19 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.