need help converting excel formula to access

keeper1984

New member
Local time
Today, 14:12
Joined
Feb 5, 2014
Messages
4
the current formula in excel is

=IF([DATE IN]>=[START DATE];[DATE OUT]-[DATE IN];[DATE OUT]-[START DATE])
how would i use this in access
 
Similar,
Code:
[COLOR=Green]'If your regional settings uses ';' as the separator use ; (semi-colon) not , (comma)[/COLOR]
= IIF([DateIn] >= [StartDate], [DateOut] - [DateIn], [DateOut]-[StarteDate])
Although you really need to look into following a Good Naming Convention.
 
In a query? The query/access equivalent of IF is IIF
YourColumnAlias: IIF([DATE IN]>=[START DATE];[DATE OUT]-[DATE IN];[DATE OUT]-[START DATE])

May need to replace the ; by , depending on your regional settings.

Edit: LOL @ Paul
 

Users who are viewing this thread

Back
Top Bottom