Converting field to a date format

Hi Again,
I have the below date column. I wanted to conver to to a proper date format like yyyy-mm-dd or dd-mm-yyyy. How can I do it? To Date or Convert to Date fucntions dont seem to be working :(

image.png

Answers

  • Josh Boxer
    Josh Boxer Administrator

    image.png

    param inputString;
    FormatDate(
    CreateTimeStamp(
    Substring([p:inputString], 1, 4),
    Substring([p:inputString], 5, 6),
    Substring([p:inputString], 7, 8),
    0,
    0,
    0,
    0
    ),
    'dd-MM-yyyy'
    )
  • Simms, Henry
    Simms, Henry Administrator

    There's a pre-built Parse Date function available to download from the Function Library which does this in the same way, but with added flexibility of being able to define the input date format, and with some extra error handling when the date cannot be parsed:

    image.png

    Result with test input:

    image.png