From: Dimitri Kowaletschew on
Hello!

Does anybody know how to convert a Unix timestamp to a VB date/time?

Thanks very much!!
Dimi
From: Rick Rothstein on
I think you can use this...

VBdate = DateAdd("s", UnixTimeStamp, #1/1/1970#)

where you would assign your Unix timestamp to the indicated variable.

--
Rick (MVP - Excel)


"Dimitri Kowaletschew" <dimi.k(a)yahoo.com> wrote in message
news:OtPv3ImfKHA.5300(a)TK2MSFTNGP02.phx.gbl...
> Hello!
>
> Does anybody know how to convert a Unix timestamp to a VB date/time?
>
> Thanks very much!!
> Dimi

From: Dee Earley on
On 16/12/2009 15:44, Rick Rothstein wrote:
> I think you can use this...
>
> VBdate = DateAdd("s", UnixTimeStamp, #1/1/1970#)
>
> where you would assign your Unix timestamp to the indicated variable.

It's not that simple last I looked as we are currently dealing with
numbers that have rolled over into negative values (using VBs signed longs)

It shoudl be possible, but I never got code working properly as I just
asked my colleague to change the format to a more VB friendly value :)

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: Ralph on

"Dee Earley" <dee.earley(a)icode.co.uk> wrote in message
news:%23rbHQtvfKHA.5300(a)TK2MSFTNGP02.phx.gbl...
> On 16/12/2009 15:44, Rick Rothstein wrote:
> > I think you can use this...
> >
> > VBdate = DateAdd("s", UnixTimeStamp, #1/1/1970#)
> >
> > where you would assign your Unix timestamp to the indicated variable.
>
> It's not that simple last I looked as we are currently dealing with
> numbers that have rolled over into negative values (using VBs signed
longs)
>
> It shoudl be possible, but I never got code working properly as I just
> asked my colleague to change the format to a more VB friendly value :)
>

Many "Unix Timestamps" are GMT So you need to go piddle with time zones as
well.
http://www.trap17.com/index.php/Converting-Unix-Timestamp_t20240.html

Also as a minor warning to the OP, within any shop that is using "unix" with
other services such as Oracle or PHP there may be a common critter everyone
is passing around calling a "Unix TimeStamp", but in reality it might be
based one of several established "Time" formats. Always ask before going off
and making assumptions, can save a lot of *time*. <g>

-ralph


From: Jeff Johnson on
"Ralph" <nt_consulting64(a)yahoo.com> wrote in message
news:uCEc6PxfKHA.1652(a)TK2MSFTNGP05.phx.gbl...

> Also as a minor warning to the OP, within any shop that is using "unix"
> with
> other services such as Oracle or PHP there may be a common critter
> everyone
> is passing around calling a "Unix TimeStamp", but in reality it might be
> based one of several established "Time" formats. Always ask before going
> off
> and making assumptions, can save a lot of *time*. <g>

<Rimshot>


 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Archiving
Next: Problems shelling another application