Help

Using Formula MONTH and DATETIME_FORMAT

Topic Labels: Formulas
1616 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Shalane_Sherloc
4 - Data Explorer
4 - Data Explorer

My formula is MONTH({Trial Date})-1
I want that to then return a month name instead of a number.
I’ve been trying to figure out the DATETIME_FORMAT to do it, but I cant get it.

2 Replies 2
Zollie
10 - Mercury
10 - Mercury

To replace a month number with a month name, use a SWITCH statement as demonstrated below.

How it Works

SWITCH(
    some logic that returns a value,
    if the value is this,
    return this,
    if it's this,
    return this,
    etc.
)

MONTH({Trial Date})-1
I think you’re trying to describe ‘the month before the trial date?’ If so, run this:

SWITCH(MONTH({Trial Date})-1,0,"January",1,"February",2,"March",3,"April",4,"May",5,"June",6,"July",7,"August",8,"September",9,"October",10,"November",11,"December")

Shalane_Sherloc
4 - Data Explorer
4 - Data Explorer

THANK YOU! This worked perfectly! I’m not familiar with SWITCH.

Thank you for your help on this!