importing YYMM dates from a text file

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I import date fields that contain YYMM (no day) dates from a text file. Right now, I import those
dates as a text field. Is there a way to import that field as a date instead, so I can do date
calculations and sorting?

Jeff
 
Import into a temporary table and then use a query that calculates the date
to append to your "permanent" table.
 
Use your import spec to link to the file rather than import it. Then convert
it in the query during the append process, to avoid temp tables. For example
assigning each date the first day of the month during the append process.
 
I import date fields that contain YYMM (no day) dates from a text
file. Right now, I import those dates as a text field. Is there a
way to import that field as a date instead, so I can do date
calculations and sorting?

YYMM isn't a date, so it's not going to fit comfortably into a date
field.

You can

either (a) mung it into a date by choosing the 1st or the 15th of the
month, and storing that

or (b) use a numeric value to get the month: (12 * YY + MM) and do
whatever you like with that.

By the way, _please_ tell me you really mean YYYMM... :-)


HTH


Tim F
 
Back
Top