Gustav Brock
Gustav at cactus.dk
Fri Apr 28 07:20:03 CDT 2006
Hi Rocky > Do you mean the 1/1/1970? Yes, as shown. That's a fixed date. /gustav >>> bchacc at san.rr.com 28-04-2006 14:00:36 >>> Gustav: Do you mean the 1/1/1970? Or the value returned by the expression? Rocky Gustav Brock wrote: > Hi Gary and Rocky > > Just a note: If possible, you should use a date value and not its string representation with DateAdd() even though the example uses a string: > > Format(DateAdd("s",[date],#1/1/1970#),"Short Date") > > It doesn't make much of a difference here but in other situations it might as the string will be converted to a date value using the local date/time settings. That will not happen for a date value. > > /gustav > > >>>> bchacc at san.rr.com 28-04-2006 04:01 >>> >>>> > Gary: > > Works perfectly! I'm using Expr1: > Format(DateAdd("s",[date],"1/1/70"),"Short Date") just to get the date > only so I can count the hits by date. > > Thank you. > > Rocky > > > Gary Kjos wrote: > >> Hi Rocky, >> >> If the Unix Epoch date represents a number of seconds from a magic >> point in time, how about if if you did a dateadd function with the >> field containing the number of seconds to added the magic date with >> the result being the date in date format from where you can store it >> or do further fun stuff with it.. It would be something like >> >> OutputDateField = DateAdd("s", lngUnixEpochDateInput, "1/1/1970") >> >> Dateadd is described here... >> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctdateadd.asp >> >> That is what I would probably do anyway.