From: "Dave "Crash" Dummy" on
ralph wrote:
> On Fri, 8 Oct 2010 10:12:46 -0400, "Bob Barrows"
> <reb01501(a)NOyahoo.SPAMcom> wrote:
>
>> ralph wrote:
>>> On Fri, 8 Oct 2010 09:25:43 -0400, "Michael Courter"
>>> <mcourter(a)mindspring.com> wrote:
>>>
>>>> i need an example of how to code a time comparison.
>>>> i need to check to see if a value in a date/time column is greater
>>>> than 10 minutes from the current time.
>>>> i appreciate your help.
>>>> thanks,
>>>> mcnewsxp
>>>>
>>> Difftime()
>>>
>> What's that?
>
> ha. Good question.
>
> Wrong newsgroup.

The VBS version is DateDiff()
--
Crash

"When you get to a fork in the road, take it."
~ Yogi Berra ~
From: mcnewsxp on

"Bob Barrows" <reb01501(a)NOyahoo.SPAMcom> wrote in message
news:i8n8sg$h6t$1(a)news.eternal-september.org...
> Michael Courter wrote:
>> i need an example of how to code a time comparison.
>> i need to check to see if a value in a date/time column is greater
>> than 10 minutes from the current time.
>> i appreciate your help.
>> thanks,
>> mcnewsxp
>
> What database? Type and version please. "Date/time" sounds like Jet...
> Do you want to do this in a query? Or in your vbscript code?
> --

thanks for the responses. i worked it out with code. was simpler than i
thought.


From: Ruediger Roesler on
Michael Courter <mcourter(a)mindspring.com> typed:

>i need an example of how to code a time comparison.
> i need to check to see if a value in a date/time column is greater
> than 10 minutes from the current time.
> i appreciate your help.

If DateDiff("s", dtime, Now) > 10 * 60 Then

DateDiff(/interval/, date1, date2 [,firstdayofweek[, firstweekofyear]])

The interval argument must be one of the following values:

Expression Corresponds to
yyyy Years
q Quarters
m Months
y Days of year
d Days
w Weekdays
ww Weeks of year
h Hours
n Minutes
s Seconds

But watch out: If you want to calculate the lifetime of a man in years,
then you have to compare the days, not the years, this would become
wrong dependent from the given birthdate:

DateDiff("yyyy", dtmBirthdate, Now)

In my case it would become right, because I was born at the beginning of
the year.

--
ЯR

First  |  Prev  | 
Pages: 1 2
Prev: popup
Next: Excel window visible!