Function to convert text to date

Is there a function available to convert text to date? for example "16 Sep 2015 13:49:21 GMT" >>> "09/16/2015 12:39 GMT"

OriginalPostID-167707

OriginalPostID-167707

  Discussion posts and replies are publicly visible

Parents
  • I had a similar requirement and used userdatetime() instead of datetime() .. Could be useful for some one. Here I capture only date from user and append either 00:00 hrs or 23:49 hrs using intervalds() and return to the parent rule. This requirement to apply filter on database column which is of type date and time.


    = with(
    /* ri!myDate is of type DATE */
    local!myDateFormatted: text(ri!myDate, "mm/dd/yyyy HH:mm z"),
    local!myDateSplit: split(split(split(local!myDateFormatted," "),"/"),":"),
    userdatetime(splitInt[3],splitInt[1],splitInt[2],splitInt[4],splitInt[5],"00")
    /*
    To add hours are minutes to reult intervalds() can be used
    userdatetime(splitInt[3],splitInt[1],splitInt[2],splitInt[4],splitInt[5],"00") + intervalds(23,49,0)
    */
    )
Reply
  • I had a similar requirement and used userdatetime() instead of datetime() .. Could be useful for some one. Here I capture only date from user and append either 00:00 hrs or 23:49 hrs using intervalds() and return to the parent rule. This requirement to apply filter on database column which is of type date and time.


    = with(
    /* ri!myDate is of type DATE */
    local!myDateFormatted: text(ri!myDate, "mm/dd/yyyy HH:mm z"),
    local!myDateSplit: split(split(split(local!myDateFormatted," "),"/"),":"),
    userdatetime(splitInt[3],splitInt[1],splitInt[2],splitInt[4],splitInt[5],"00")
    /*
    To add hours are minutes to reult intervalds() can be used
    userdatetime(splitInt[3],splitInt[1],splitInt[2],splitInt[4],splitInt[5],"00") + intervalds(23,49,0)
    */
    )
Children
No Data