Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Can you decipher this timestamp?

I'm using a webservice to update a metals ws. Anyone know how to
decode the timestamp?

<pricelist currency="usd"
<price timestamp="1354524720" per="ozt" commodity="gold"1718.35</
price
<price timestamp="1354524720" per="ozt"
commodity="palladium"683.00</price
<price timestamp="1354524720" per="ozt"
commodity="platinum"1605.00</price
<price timestamp="1354524720" per="ozt" commodity="silver"33.61</
price
</pricelist

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Can you decipher this timestamp?

Hi,

Am Mon, 3 Dec 2012 07:37:39 -0800 (PST) schrieb cate:

I'm using a webservice to update a metals ws. Anyone know how to
decode the timestamp?

<pricelist currency="usd"
<price timestamp="1354524720" per="ozt" commodity="gold"1718.35</
price


that is a unix time stamp. Look in web for Unix Timestamp Converter.
354524720 is 12-03-2012 16:48:04 UTC

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 829
Default Can you decipher this timestamp?

"Claus Busch" wrote:
Am Mon, 3 Dec 2012 07:37:39 -0800 (PST) schrieb cate:
I'm using a webservice to update a metals ws.
Anyone know how to decode the timestamp?
<price timestamp="1354524720" [....]


that is a unix time stamp. Look in web for
Unix Timestamp Converter.
354524720 is 12-03-2012 16:48:04 UTC


If Claus is correct (and I would guess he is), you can do the conversion in
Excel using:

=--TEXT(354524720/86400 + DATE(1970,1,1),"m/d/yyyy hh:mm:ss")

and in VBA using:

Dim x as Double
x = CDate(Format(354524720/86400 + DateSerial(1970,1,1),"m/d/yyyy
hh:mm:ss"))

where "m/d/yyyy" should be the short-date form configured in the Regional
and Language Options control panel (WinXP).

(I prefer not to use type Date because VBA's special interpretation often
screws me up.)

However, that returns 12/3/2012 08:52:00, not 16:48:04.

I believe 08:52:00 is the correct result, since "Unix time" is the number of
seconds since 1/1/1970 midnight (00:00) "not counting leap seconds". The
formulas above agree with the dynamic example at
http://en.wikipedia.org/wiki/Unix_time.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Can you decipher this timestamp?

Hi Joe,

Am Mon, 3 Dec 2012 08:33:28 -0800 schrieb joeu2004:

However, that returns 12/3/2012 08:52:00, not 16:48:04.

I believe 08:52:00 is the correct result, since "Unix time" is the number of
seconds since 1/1/1970 midnight (00:00) "not counting leap seconds". The
formulas above agree with the dynamic example at
http://en.wikipedia.org/wiki/Unix_time.


your are right. I have a makro to convert Unix time into GMT and I get
03.12.2012 09:52:00
But is it so simple to divide the unix time by 86400 and add the unix
start date? I think that PST and PDT must be considered


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 829
Default Can you decipher this timestamp?

"Claus Busch" wrote:
But is it so simple to divide the unix time by 86400
and add the unix start date? I think that PST and PDT
must be considered


There was no information to indicate whether the timestamp is local time or
GMT.

If the timestamp is GMT and "cate" wants local time, yes, some timezone
offset must be added or subtracted. But the same would be true of any
representation of GMT in the file.

On the other hand, if the timestamp is already local time, no timezone
offset is needed unless "cate" wants to convert it to GMT.



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
Help decipher this code PLEASE!!! Talon213 Excel Worksheet Functions 2 August 10th 12 07:33 AM
Copy a Module - Please Help me decipher the Pearson Code CMA Excel Programming 0 September 21st 07 02:52 PM
Please help me decipher the result of COUNT. Epinn New Users to Excel 14 August 17th 06 03:31 PM
Now as timestamp Lp12 Excel Worksheet Functions 5 August 13th 06 11:32 AM
Decipher Formula Paula Excel Worksheet Functions 1 December 3rd 04 06:08 PM


All times are GMT +1. The time now is 02:06 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"