Subtracting Numeric Value from Date Value

gico1972

Registered User.
Local time
Today, 12:46
Joined
Oct 19, 2008
Messages
25
Need help in my query to subtract [Days] (Numeric Value) from a date field [TravelDate]

Appreciate any help.

Regards
 
Perhaps i was not clear.

I have 2 fields [Date of Trave] and [Days]

I just want to know what the expression would be for a calculated field.

[Date of Travel]-[Days]
25-sep-15 - 14
 
you need to understand what a date field is - it is a form of double, not a string

25-sep-15 is a string

As spike says, choose the appropriate date function for your needs - in this case it would be a dateadd function. Look this up and understand it before you say 'but I want to subtract it'
 
You can use the DateAdd function to subtract, just use a - before your [Days] field

MyNewDate = DateAdd("d",-[Days],[Date of Travel])
 

Users who are viewing this thread

Back
Top Bottom