Forum Discussion

GabriellaTremog's avatar
GabriellaTremog
Qrew Member
4 years ago

Formula to Show "Day of Week, XX/XX/XXXX to Day of Week, XX/XX/XXXX"

Hello, 

Can someone provide any insight into how to create a formula that produces text that will show [event date start] to [event date end], when [event date end] is empty. I need a field that will combine two date fields to show, for example, "Thursday, May 6, 2021 to Friday, May 7, 2021". I have the following formula in a formula - text field set, but it's showing me what I need in a simple "5/6/2021-5/7/2021" format when I need to spell it out more like above. 

If(not IsNull([event date end]),ToText([event date start])&"-"&ToText([event date end]),ToText([event date start]))

Thank you in advance for your help!

------------------------------
Gabriella Tremoglie
------------------------------
  • This will help

    var date MyDate = [Pickup Date];

    var text DayName = Case(DayOfWeek($MyDate),
    0,"Sun",
    1,"Mon",
    2,"Tue",
    3,"Wed",
    4,"Thu",
    5,"Fri",
    6,"Sat");




    List(", ", $DayName,
    List("-",
    Case(Month($MyDate),
    1,"Jan",
    2,"Feb",
    3,"Mar",
    4,"Apr",
    5,"May",
    6,"Jun",
    7,"Jul",
    8,"Aug",
    9,"Sep",
    10,"Oct",
    11,"Nov",
    12,"Dec"),
    Right("0" & ToText(Day($MyDate)),2),
    If(Year(Today())<> Year([Pickup Date]), ToText(Year($MyDate)))))

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------