Forum Discussion

WendyShoef's avatar
WendyShoef
Qrew Cadet
7 years ago

Display today's date in ""F d, Y"" (PHP date format)

I'm sure there is a simple way to do this, but I am struggling.

I know you have the Date() function but that only accepts text.

I've tried Date( Year( Today() ), Month( Today() ), Day( Today() ) ) but that doesn't work because the Year, Month, Day parts are date numbers. 

I've tried using various formulas including ToFormattedText, ToText.

Also, tried using AdjustYear([Date], 0)  but the output is actually mm-dd-yyyy not as indicated in formula reference ( "AdjustYear(ToDate("2/20/99"), 2) returns February 20, 2001" ) on https://login.quickbase.com/db/6ewwzuuj?a=dr&rid=35&rl=4m.

NOTE: PHP Date format "F d, Y" would yield March 5, 2019
  • Is this what you want?

    var date MyDate = (insert your date field here);

    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),
    ToText(Year($MyDate)))
  • Kind of works, but it Needs to be "March 5, 2019" not "March-05-2019" so the list part with "-" doesn't work.

    Thanks for the reply... seems overly complicated for as many times as I need to use it. But will probably just load a date .js function so I can use it repeatedly.