View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default Custom DateTime Format

When I use number format, 0 decimal places the CSV looks fine.

--
Jim
"Sam" wrote in message
...
|I wrote code to stack 6 files containing similar data and save to CSV
format.
| One column of data contains DateTime format, loaded by Showcase in the
| format: yyyymmddhhmmss, where the range of one day spans from
20060430000000
| to 20060430235959. Everything works fine until the file is saved to CSV
| format. All DateTime data is converted to Scientific format while all
other
| data in the transfer maintains General Formatting. All DateTime data
displays
| yyyymm followed by eight zeros (the day and time are all converted to
zeros).
| Therefore, 20060430154523 is converted to 20060400000000 and is formatted
| Scientific.
|
| This program runs using OnTime at a specific time each day. What code can
I
| use to preserve the General Format, rather than it changing to Scientific?
| I've tried to enter code to convert each item to NumberFormat=0, but it
still
| converts to Scientific upon saving to CSV.
|
| Thanks