Discussions

Expand all | Collapse all

Help formatting a text formula?

  • 1.  Help formatting a text formula?

    Posted 04-03-2018 16:11
    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])


  • 2.  RE: Help formatting a text formula?

    Posted 04-03-2018 16:24
    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.


  • 3.  RE: Help formatting a text formula?

    Posted 04-03-2018 16:28
    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. 


  • 4.  RE: Help formatting a text formula?

    Posted 04-03-2018 16:34
    please post your formula again and the error message.


  • 5.  RE: Help formatting a text formula?

    Posted 04-03-2018 16:39
    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! 


  • 6.  RE: Help formatting a text formula?

    Posted 04-03-2018 16:57
    Alls well that ends well.