D
Deepak Tulsani
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
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