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 do not find any OOTB option, Hence created reusable custom expression to convert local date and time. Please leverage if you want

    =with(
    local!months : {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},
    local!timeZone : "America/New_York",
    local!fullArray: split(ri!dateText, " "),
    local!timeArray: split(left(local!fullArray[4], 8), ":"),
    local!rawDate: datetime(
    local!fullArray[3],
    wherecontains(local!fullArray[2],local!months),
    local!fullArray[1],
    local!timeArray[1],
    local!timeArray[2],
    local!timeArray[3]
    ),
    local(local!rawDate,
    local!timeZone
    )
    )
Reply
  • I do not find any OOTB option, Hence created reusable custom expression to convert local date and time. Please leverage if you want

    =with(
    local!months : {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"},
    local!timeZone : "America/New_York",
    local!fullArray: split(ri!dateText, " "),
    local!timeArray: split(left(local!fullArray[4], 8), ":"),
    local!rawDate: datetime(
    local!fullArray[3],
    wherecontains(local!fullArray[2],local!months),
    local!fullArray[1],
    local!timeArray[1],
    local!timeArray[2],
    local!timeArray[3]
    ),
    local(local!rawDate,
    local!timeZone
    )
    )
Children
No Data