vanderLeest Posted November 30, 2017 Report Share Posted November 30, 2017 Following syntax worked as script for a calculated field in a previous report: label: Time Period (Start Date) [@field:EA_StartDate] + CASE WHEN LEN([@field:EA_EndDate]) > 1 THEN ' - ' + [@field:EA_EndDate] END Currently [@field:EA_StartDate] + ' - ' already generates "Invalid Formula" when verifying the script. Quote Link to comment Share on other sites More sharing options...
0 vanderLeest Posted November 30, 2017 Author Report Share Posted November 30, 2017 This cumbersome syntax is a Valid Formula: DatePart(mm,[@field:EA_StartDate]) + '-' + DatePart(dd,[@field:EA_StartDate]) + '-' + DatePart(yy,[@field:EA_StartDate]) + CASE WHEN LEN([@field:EA_EndDate]) > 1 THEN ' - ' + DatePart(mm,[@field:EA_EndDate]) + '-' + DatePart(dd,[@field:EA_EndDate]) + '-' + DatePart(yy,[@field:EA_EndDate]) END NB Substituting '-' with '/' (for a more standard date display) results in an Invalid Formula Quote Link to comment Share on other sites More sharing options...
Question
vanderLeest
Following syntax worked as script for a calculated field in a previous report:
label: Time Period (Start Date)
[@field:EA_StartDate] +
CASE
WHEN LEN([@field:EA_EndDate]) > 1 THEN
' - ' + [@field:EA_EndDate]
END
Currently [@field:EA_StartDate] + ' - ' already generates "Invalid Formula" when verifying the script.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.