Use the DateAdd function
Vardate1 = Format(DateAdd("d", 180, Me.TextBox1.Value), "dd MMM yyyy")
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"bijan" <(E-Mail Removed)> wrote in message
news:97201CC5-3B68-48FD-A8A6-(E-Mail Removed)...
> Hi Experts,
> I have a variable for date that calls in SQL for cut of time :
> Vardate1= Format(Me.TextBox1.Value, "DD MMM YYYY")
> :
> :
> " AND (Table1.DATE_SCH>='" & Vardate1 & "'" & _
> What I need is how add 180 days to this cut of time automatically, I tried
> :
> AND (Table1.DATE_SCH>='" & Vardate1 & "' + 180" & _
> But I didn't get proper date,
> Thanks in advance for any help
> Bijan
>
|