Forum Discussion

ElenaLarrabee1's avatar
ElenaLarrabee1
Qrew Captain
7 years ago

Help formatting a text formula?

This is what I have so far... Basically just trying to get it to display Date and Time (if there's an end time, "to end time") and then (if there's a description, "- description")

Where I'm having trouble is getting it to not display the "to" and "end time" if there is no value listed for End Time. 

It's highlighting the isNull and saying the number of arguments isn't sufficient. 

(Case(Month([Date]),1,"January",
2,"February",
3,"March",
4,"April",
5,"May",
6,"June",
7,"July",
8,"August",
9,"September",
10,"October",
11,"November",
12,"December",
"")&" "&Day([Date])
&","&" "&Year([Date]))
&" "&[Time]
&" "&
If(isnull([End Time])),"","to"&" "[End Time])
&" "&
If([Description]="","","-"&" "&[Description])

5 Replies

  • Try editing the last part to read like this

    If(isnull([End Time]),"", "to" & " " & ToText([End Time]))
    &" "&
    If([Description]="","", "-" & " " & [Description])


    I am assuming here that the field [End Time] is a Time Of Day field type. Note that you may not use IsNull(  ) for a text field.
  • So odd, it's still not working... It's telling me the arguments provided don't meet the requirements for the Case function, but highlighting IsNull still. 
  • Huh, well now error message is gone and it's saving properly! I guess it just thought there was an error until it reloaded... The same thing happened earlier too, weird!