Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 699
Default Custom DateTime Format

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with converting CUSTOM format/TEXT format to DATE format Deo Cleto Excel Worksheet Functions 6 June 2nd 09 08:14 PM
Datetime CSV format kh[_2_] Excel Discussion (Misc queries) 1 November 13th 08 09:08 AM
Format Cell as custom type but data doesn't display like I custom. ToMMie Excel Discussion (Misc queries) 6 September 11th 08 08:31 AM
datetime format issues when linking access to excel Season Excel Discussion (Misc queries) 0 December 6th 05 04:52 PM
DateTime Format Joe Harriman Excel Programming 1 October 3rd 03 02:57 PM


All times are GMT +1. The time now is 01:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"