export from query to tab delimited text file

X

xg

i want to export to TAB delimited text file from query. the date field
always include time value even if I set date format to medium date format.

i want yyyy-mm-dd format so i can import into mysql database and it seems
mysql only likes this format.
 
G

Guest

I'm assuming that you have the Tab portion figure out. If not the big hint is
to use and import spec.

In your query, put something like below with the proper field name in
YourDateField.

DateYMD: Format([YourDateField], "yyyy-mm-dd"))
 
X

xg

Thank you for your quick reply. The format functon works. However, how to
convert date to string? I have many rows. some rows have date on that field,
some are blank. since mysql does not like blank in date field, i have to put
'0000-00-00' in the field. however, access does not allow me to put that
into date field.

Jerry Whittle said:
I'm assuming that you have the Tab portion figure out. If not the big hint
is
to use and import spec.

In your query, put something like below with the proper field name in
YourDateField.

DateYMD: Format([YourDateField], "yyyy-mm-dd"))
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


xg said:
i want to export to TAB delimited text file from query. the date field
always include time value even if I set date format to medium date
format.

i want yyyy-mm-dd format so i can import into mysql database and it seems
mysql only likes this format.
 
J

John Spencer

IIF(YourDateField Is Null, "0000-00-00", Format(YourDateField,"yyyy-mm-dd"))


xg said:
Thank you for your quick reply. The format functon works. However, how to
convert date to string? I have many rows. some rows have date on that
field, some are blank. since mysql does not like blank in date field, i
have to put '0000-00-00' in the field. however, access does not allow me
to put that into date field.

Jerry Whittle said:
I'm assuming that you have the Tab portion figure out. If not the big
hint is
to use and import spec.

In your query, put something like below with the proper field name in
YourDateField.

DateYMD: Format([YourDateField], "yyyy-mm-dd"))
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


xg said:
i want to export to TAB delimited text file from query. the date field
always include time value even if I set date format to medium date
format.

i want yyyy-mm-dd format so i can import into mysql database and it
seems
mysql only likes this format.
 
X

xg

perfect! Thanks.

John Spencer said:
IIF(YourDateField Is Null, "0000-00-00",
Format(YourDateField,"yyyy-mm-dd"))


xg said:
Thank you for your quick reply. The format functon works. However, how to
convert date to string? I have many rows. some rows have date on that
field, some are blank. since mysql does not like blank in date field, i
have to put '0000-00-00' in the field. however, access does not allow me
to put that into date field.

Jerry Whittle said:
I'm assuming that you have the Tab portion figure out. If not the big
hint is
to use and import spec.

In your query, put something like below with the proper field name in
YourDateField.

DateYMD: Format([YourDateField], "yyyy-mm-dd"))
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


:

i want to export to TAB delimited text file from query. the date field
always include time value even if I set date format to medium date
format.

i want yyyy-mm-dd format so i can import into mysql database and it
seems
mysql only likes this format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top