Senin, 03 Februari 2014

Re: [MS_AccessPros] Manipulate date in query

 

Duane,

Your expression worked and I changed it to Date(), I knew I was missing something but it looked correct at first glance.

Thank You
 
Jim Wagner



On Monday, February 3, 2014 12:20 PM, Duane Hookom <duanehookom@hotmail.com> wrote:
 
Jim,

There is no WHERE clause provided so I'm not sure how anything can be "left out".

I see you used Now() rather than Date(). Apparently you need the time with the date.

Your expression states if the date field equals 1/1/1900 then use a date 366 days in the future. Your IIf() is missing the 3rd argument.

Duane Hookom MVP
MS Access

________________________________
> From: luvmymelody@yahoo.com
>
>
> Duane
>
> I had changed the expression to the following but it leaves out the
> dates that are not 1/1/1900. The values with good dates are empty.
> There was a business process that forced them to put the 1/1/1900. I
> guess it is a flag of some kind.
>
> I guess I am not sure how to explain it.
>
> End Date: IIf([Earnings End
> Dt]=#1/1/1900#,DateAdd("d",Now()+365,[Earnings End Dt]))
>
>
> Jim Wagner
> ________________________________
>
>
> On Monday, February 3, 2014 12:02 PM, Duane Hookom
> <duanehookom@hotmail.com> wrote:
>
> Jim,
>
> The system date is returned from the Date() function although I'm not
> sure that is what you mean.
>
> Duane Hookom MVP
> MS Access
>
> ________________________________
>> From: luvmymelody@yahoo.com
>>
>>
>> I have a query that we need to show a value of the value of the date + 365
>> The value that we are having trouble with is that the field has the
>> value of 1/1/1900. I have the below expression but I don not know how
>> to put the system date in the IIf statement. Can anyone help with this?
>>
>> End Date: IIf([Earnings End Dt]=#1/1/1900#,DateAdd("d",365,[Earnings
>> End Dt]))
>>
>> Thank You
>>
>>
>> Jim Wagner


__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar