I'm rusty, but it is probably dtoc("pfbstats2.year") You might have to do something along these lines alltrim(dtoc("pfbstats2.year"))
Ltrim() will work as well, or rtrim() depending on which way you need to go As for the rest, I don't know what your fields are, but you will need to build it M_YYYY = above code M_MM = similar code M_DD = similar code M_fulldate = m_yyyy + "-" + m_mm + "-" + m_dd -----Original Message----- From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Gary Jeurink Sent: Tuesday, October 29, 2013 9:32 PM To: profox@leafe.com Subject: exporting to text delimited Long ago I learned how to create data dump to text file snippets by browsing a table and then using the export option to build the statement for me and then copy it out of the command window and make it into a procedure. any way I need to export the football season (a 4-digit) integer as a string with quotes on each side. It starts out looking something like; COPY TO c:\alldat2\special\tmppfbstats.txt FOR pfbstats2.year=2013 FIELDS Pfbstats2.tmid, Pfbstats2.year, . etc and then DELIMITED WITH '"' WITH CHAR , How do I export Pfbstats2.year as a 4-character string like "2013", instead of 2013, How do I export a date to the yyyy-mm-dd, format I need. And of course I think I will change the .t. or .f. into "Y" or "N" If I get this figured out, I should be able to update my mysql database with 2-clicks and 1-update query from mysql workbench. Gary Jeurink --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/082401ced519$2c5e7690$851b63b0$@gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.