We help IT Professionals succeed at work.

Help with formula

Gordon Hughes
on
94 Views
Last Modified: 2019-01-11
What is wrong with this?
if ({@DBSCheck}) = 'No' then 'NA' else ({MembersDetails.DBS Expiry Date})

it says a string is required after else
Comment
Watch Question

Raghavendra HullurSoftware Developer
CERTIFIED EXPERT

Commented:
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.
Gordon HughesDirector

Author

Commented:
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
Software Developer
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Gordon HughesDirector

Author

Commented:
Thanks all working great
Gordon