How can i display a date field as DDMMMYYYY?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

We use this to record Code Dates for perishable goods.


Photo of Douglas0507

Douglas0507

  • 30 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBasePros (Laura Thacker)

QuickBasePros (Laura Thacker), Champion

  • 5,224 Points 5k badge 2x thumb
Look in the FUNCTIONS link of the formula for ToFormattedText
Photo of Douglas0507

Douglas0507

  • 30 Points
Any idea what the syntax would be to display in this format: 15AUG2016?
not tested but try this

var text MMM = 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");

var text DD = Right("0" & ToText(Day($MyDate)),2);

var text YYYY = ToText(Year($MyDate)));




$DD & $MMM & $YYYY
Photo of Douglas0507

Douglas0507

  • 30 Points
I get the following error:
"A variable declaration must end with a semi-colon."
Try changing the second last line to this

var text YYYY = ToText(Year($MyDate));
Photo of Douglas0507

Douglas0507

  • 30 Points
Formula Error -- Undeclared identifier
The variable MyDate is not declared.
sorry, I left off the very first line

var date MyDate = [and put your date field here];
Photo of Douglas0507

Douglas0507

  • 30 Points
Works perfectly.  Thanks!
Photo of QuickBasePros (Laura Thacker)

QuickBasePros (Laura Thacker), Champion

  • 5,224 Points 5k badge 2x thumb
You set the FIELD property to show Month as a Month, instead of a number