Link to home
Create AccountLog in
Avatar of Gordon Hughes
Gordon HughesFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Help with formula

What is wrong with this?
if ({@DBSCheck}) = 'No' then 'NA' else ({MembersDetails.DBS Expiry Date})

it says a string is required after else
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Hi,

Your else condition seems to be returning a date data type as the field suggests.
You need to typecast the date to a string using cStr({MembersDetails.DBS Expiry Date}) or cStr({MembersDetails.DBS Expiry Date}, <required date format for e.g MM/dd/yyyy>)

Hope that helps.
Avatar of Gordon Hughes

ASKER

Hi
I have modified the formula to
if ({@DBSCheck}) = 'No' then 'NA' else cStr({MembersDetails.DBS Expiry Date})

It partially works
what do I need to add to only see dd/mm/yyy  not any hours

Gordon
ASKER CERTIFIED SOLUTION
Avatar of Raghavendra Hullur
Raghavendra Hullur
Flag of India image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thanks all working great
Gordon