LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Handling hhmmss time format

Hi,

I have a bit of a problem with the time formatting in excel, or rather
the handling of the same for the data that I have.

I have a big file, that has different counters separated by comma
(essentially a csv file). Here's a sample of a line in those files:

GPRS1,20120205,110000,gnctx,4,gprs,
3430,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0

The third field (110000) in this example, is the timestamp.

GPRS1,20120206,004500,gnctx,
4,,65536,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0,0,0,0
GPRS1,20120206,001500,gnctx,4,gprs,
790,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0

GPRS1,20120206,020000,gnctx,4,gprs,
54004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0

Now I could happily plot the graph with these values, ONLY if Excel
would not strip the leading zeros from the timestamp in samples like
the latter 3 mentioned above. For a timestamp of 004500, Excel strips
the leading zeros and shows 4500. For timestamp 013000, it displays
the value as 13000. For a timestamp of 000000, it just shows 0! That
messes up the whole timestamps when I try to plot the graph, and just
cannot get to do what I want to.

I've tried many tricks, including setting the Custom format to
"number" of format "000000". That "displays" the field correctly, but
when I perform any operation, it still uses the originally displayed
value.

I don't understand why is Excel ignoring the leading zeros in the
first place, when the original value itself has leading zeros. Even
when I set the formatting to "Text", it still would strip the leading
zeros.

I've been breaking my head on this since last one week, but haven't
been able to get this work. Could someone help please?

Regards,
Deepak
 
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
How to type format time in decimal format & calculate time Cheyenne Excel Discussion (Misc queries) 1 February 13th 09 12:09 AM
Formatting Time As hhmmss Gives Me Dates Instead? Donna Excel Worksheet Functions 3 April 4th 07 05:14 PM
ODBC Run-Time Error Handling Help MikeElectricUtility Excel Programming 5 February 16th 07 04:28 PM
Excel VBA rounding / time handling questions GSpline Excel Programming 5 September 14th 05 12:08 AM
Error handling with a handling routine ben Excel Programming 0 March 15th 05 03:01 PM


All times are GMT +1. The time now is 06:02 AM.

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

About Us

"It's about Microsoft Excel"