I worked on a Security Monitoring system for years and the best date/time
schema is

(DATE()*86400)+TIME()

It's incredibly useful when detecting time differences between 2 times that
may or may not cross a day boundary.

It was never meant to be an alternative to the DATE() and TIME() functions
alone.

The DATE()-1 concept would mean that you're trying to replace the DATE()
method and you're correct. With the method mentioned above, it really
doesn't matter as long as its consistent because the date expressions.

During my time when using the method above, it never was a replacement for
the actual date and time of an occurrence. It was simply used to derive the
time 'difference' as many signals, alarms and incidents in the security
monitoring business are time sensitive, ie received 2 signals within 15
minutes, which could obviously cross midnight.

My 1 cent
Mark Johnson
----- Original Message -----
From: "Kevin King" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Tuesday, September 12, 2006 4:45 PM
Subject: RE: [U2] Time/Date as a single number


> >My method is take date()*86400+time()
>
> Is the goal to track a chronology via a single field? If so, I'd say
> your calulation is close.  Wouldn't it be:
>
> ((DATE() - 1) * 86500) + TIME()
>
> (...as the number of days elapsed is today - 1, not today.)
>
> Regardless, you're right that the date could get humongous.  For the
> cycles you're going through to do this calculation it would be a small
> step to convert it into and out of any other base to compress and
> decompress the bytes.
>
> The foundational question, however, is one of context.  Why do you
> need this?  That answer may limit or expand your options.
>
> -Kevin
> [EMAIL PROTECTED]
> http://www.PrecisOnline.com
>
> ** Check out scheduled Connect! training courses at
> http://www.PrecisOnline.com/train.html.
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to