Subtracting Numeric Value from Date Value (1 Viewer)

gico1972

Registered User.
Local time
Today, 14:24
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
 

gico1972

Registered User.
Local time
Today, 14:24
Joined
Oct 19, 2008
Messages
25
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
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:24
Joined
Feb 19, 2013
Messages
16,607
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'
 

Minty

AWF VIP
Local time
Today, 14:24
Joined
Jul 26, 2013
Messages
10,368
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

Top Bottom