Re: query that runs two variables

anonymous_at_discussions.microsoft.com
Date: 02/01/04


Date: Sat, 31 Jan 2004 18:25:46 -0800

Thanks Duane. Un fortunately when I pasted your
suggestion into the query and modified the column headers
to match the table it gave me an error message that I was
missing a ! or .(dot) or illegal use of a parenthesis
message.
>-----Original Message-----
>Try:
>NumDays: DateDiff("d",[FirstDate], Nz([SecondDate],Date
()))
>
>--
>Duane Hookom
>MS Access MVP
>
>
>"Bruce" <anonymous@discussions.microsoft.com> wrote in
message
>news:707d01c3e6e8$0e816cb0$a501280a@phx.gbl...
>> I am trying to create a query that will give me the
>> difference between two dates in a number of days elapsed
>> format. That portaion works fine, but I also want the
>> same query to give me the elapsed days if the second
date
>> is missing, subsituting the current date.
>>
>> Something like:
>>
>> IF Date2 is Null
>> Then DateNow()
>>
>> any suggestions?
>
>
>.
>



Relevant Pages

  • Re: DBI:CSV join ... flashback to 2002
    ... The dot have special meanings in SQL for table names and is not just an allowed character. ... Running a simple query with no aliases works. ... When I run the same query with an alias i get an error message ... the error referenced in previous posts. ...
    (perl.dbi.users)
  • Re: tempdb grows to 8G suddenly
    ... that a join predicate is missing. ... >> to someone running a query which has a join that has not been qualified ... a huge result set gets built up (in tempdb ...
    (microsoft.public.sqlserver.server)
  • RE: DBI:CSV join ... flashback to 2002
    ... Another way to remove the dot in the query is as follows. ... When I run the same query with an alias i get an error message ... the error referenced in previous posts. ...
    (perl.dbi.users)
  • Re: Combo Box Problem
    ... if so, what's missing? ... getting an error message, and if so, what? ... a SQL statement? ... if it's a query or SQL ...
    (microsoft.public.access.gettingstarted)
  • Re: RM formalism supporting partial information
    ... omniscient database. ... If the user formulates a query then this will now ... If the age or occupation is missing we could ... the value-does-not-apply interpretation can always also be ...
    (comp.databases.theory)