Norm
Thu Oct 09 22:08:19 CDT 2008
"Karl E. Peterson" <karl@mvps.org> wrote in message
news:%23c%23zNenKJHA.4908@TK2MSFTNGP02.phx.gbl...
> Norm wrote:
>> The new version of firefox is storing their expire date in this 10 digit
>> format:
>>
>> 2145801610
>>
>> and according to the information in the browser this should be the date:
>>
>> Wednesday, December 30, 2037 9:00:00 AM
>
> What Bob said...
>
> Public Function NetTimeToVbTime(ByVal NetDate As Long) As Double
> Const BaseDate# = 25569 'DateSerial(1970, 1, 1)
> Const SecsPerDay# = 86400
> NetTimeToVbTime = BaseDate + (CDbl(NetDate) / SecsPerDay)
> End Function
>
> Public Function VbTimeToNetTime(ByVal VbDate As Double) As Long
> Const BaseDate# = 25569 'DateSerial(1970, 1, 1)
> Const SecsPerDay# = 86400
> VbTimeToNetTime = (VbDate - BaseDate) * SecsPerDay
> End Function
>
> That gives me this:
>
> ?vbtimetonettime(cdbl(#12/30/2037 9:00:00 AM#))
> 2145776400
>
> ?cdate(nettimetovbtime(2145801610))
> 12/30/2037 4:00:10 PM
>
> Account for UTC, and you're probably there.
> --
> .NET: It's About Trust!
>
http://vfred.mvps.org
>
Thanks All,
I see I still have a lot to learn, but think I am going to run out years
first. :-)
Thanks again,
Norm