Convert text of type "11 May 2021 07:08:12 GMT" to datetime

Hi Team,

I have a csv in which I am receiving "11 May 2021 07:08:12 GMT" as text in one of the columns, Is there anyway to cast  to Appian datetime type

Regards

Bihitak

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    Using a combination of Appian functions you could develop an Expression Rule that consumes the date text string in question and returns a valid Appian DateTime value.  It would require a bit of parsing on your part.

    The starting hint I have is, the "datetime()" funciton consumes "year, month, day, hour, minute, second".  You would be able to use existing functions to break up the incoming text into parts, convert the month text to a numeric value, and pass them all into that rule.  You would want to test it against a wide variety of example inputs to make sure it returns the expected results in all such cases.

Reply
  • 0
    Certified Lead Developer

    Using a combination of Appian functions you could develop an Expression Rule that consumes the date text string in question and returns a valid Appian DateTime value.  It would require a bit of parsing on your part.

    The starting hint I have is, the "datetime()" funciton consumes "year, month, day, hour, minute, second".  You would be able to use existing functions to break up the incoming text into parts, convert the month text to a numeric value, and pass them all into that rule.  You would want to test it against a wide variety of example inputs to make sure it returns the expected results in all such cases.

Children