Formatting date/time in FlexGrid column

Posted by: jtyndall on 26 March 2020, 7:39 am EST

  • Posted 26 March 2020, 7:39 am EST

    Hey folks,

    I'm trying to find the magical formula for formatting a FlexGrid column so that it reflects the proper meridian value at the end of the time.

    I've gotten as far as this...
    C1FlexGrid1.Cols(1).Format = "ddd M/dd/yyyy h:mm"

    And that produces a value like this...
    "Thu 3/26/2020 2:00"

    So I'm almost there. But I can't seem to figure what magic adds the the AM/PM indicator.

    Thanks in advance for your pointers.
    Jamie
  • Marked as Answer

    Replied 26 March 2020, 8:04 am EST

    Hello Jamie,

    Can you try to modify your format to "ddd M/dd/yyyy h:mm tt" and see if you achieve your expected output.

    With thanks,
    Ruchir
  • Replied 27 March 2020, 2:35 am EST

    Thanks Ruchir! That was the magic I needed.

    With kind regards,
    Jamie
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels