Mark A Matte
markamatte at hotmail.com
Fri Mar 23 20:37:19 CDT 2007
wow...thats cool...I will plug it in and try tomorrow. Thanks, Mark A. Matte P.S...to non computer people mine looks cooler...lol >From: "Stuart McLachlan" <stuart at lexacorp.com.pg> >Reply-To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >To: Access Developers discussion and problem >solving<accessd at databaseadvisors.com> >Subject: Re: [AccessD] UNIX time. Was: Crack Code >Date: Sat, 24 Mar 2007 09:52:31 +1000 > >On 23 Mar 2007 at 17:23, Mark A Matte wrote: > > > Function DeCode(OBJID As String) > > Dim P_One >... > > P_One = Left(OBJID, 1) >... > > P_One = DLookup("[Val] ", "tblKey", "[char]= '" & P_One & "'") >... > > P_One = P_One * 60466176 >... > > DeCode = DateAdd("s", (P_One + P_Two + P_Three + P_Four + P_Five + >P_Six), > > #12/31/69 4:00:00 PM#) > > > > End Function > > > > Any better ideas...please let me know. > >Lose all the DLookups and use a loop :-) > >Function Decode2(OBJID As String) As Date >Dim lngSeconds As Long >Dim strValues As String >Dim lngLoop As Long > >strValues = "123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" > >For lngLoop = 1 To 6 > lngSeconds = lngSeconds + _ > (InStr(strValues, Mid$(OBJID, lngLoop, 1)) * 36 ^ (6 - lngLoop)) >Next >Decode2 = DateAdd("s", lngSeconds, #12/31/1969 4:00:00 PM#) >End Function >-- >Stuart > > >-- >AccessD mailing list >AccessD at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/accessd >Website: http://www.databaseadvisors.com _________________________________________________________________ Interest Rates near 39yr lows! $430,000 Mortgage for $1,399/mo - Calculate new payment http://www.lowermybills.com/lre/index.jsp?sourceid=lmb-9632-18466&moid=7581