Custom DateTime Format

S

Sam

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
 
J

Jim Rech

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

--
Jim
|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
 

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