Forum Discussion

VivekVishwanat3's avatar
VivekVishwanat3
Qrew Cadet
6 years ago

Date Field format

Hi, 
  • QuickBase is supporting date format as mm-dd-yyyy, is it possible to get date field as mm/dd/yyyy?
  • suppose the user enters random text say "jvbsdv" in the date field in the form, the application should prompt user to enter valid data (or) the date field should be cleared. is their any way to achieve this in the Quickbase?

3 Replies

  • Hi Vivek,

    You need to create a formula text field for this purpose.

    ToText(Month([Your Date Field]))&"/"&ToText(Day([Your Date Field]))&"/"&ToText(Year([Your Date Field]))

    Thanks,
    Gaurav
    • AudreyBenenati's avatar
      AudreyBenenati
      Qrew Cadet
      Hello, Thank you for the solution above.

      Is there a way to do this without dropping leading zeroes for single digit months and days of the month?

      ------------------------------
      Audrey
      ------------------------------
      • MalcolmMcDonald's avatar
        MalcolmMcDonald
        Qrew Cadet
        Hi Audrey - I hope you found your answer two years ago - just figured out the answer myself:

        I put it in a conditional first to make sure the date field was set, otherwise it would add the padded stuff and look wrong. My Date field was a date time, so I also stripped out the time first.

        If (not IsNull([Date]),
        ToText(Year(ToDate([Date])))&"-"&PadLeft(ToText(Month(ToDate([Date]))),2,"0")&"-"&PadLeft(ToText(Day(ToDate([Date]))),2,"0"),
        "")

        ------------------------------
        Malcolm McDonald
        ------------------------------