1 2 Previous Next 18 Replies Latest reply on Dec 10, 2018 1:27 AM by Ombir Rathee

    Dateparse function issue for date string

    Alex Chang

      i have a  string e.g. "11/23/2018 4:13:05 PM"

      and i'm trying to conversion to tableau format

      search function called dateparse can help me

      try to  DATEPARSE("mm/dd/yyyy hh:mm:ss a",[START TIME])

      the result is null

       

      can someone help me figure it out for me

       

      and sorry about my poor English

      =============================================================

      finally I change my mind , I modified my data source in excel file (tableau forum.xlsx sheet 2)

      1.split up string "11/23/2018 4:13:05 PM" to  "11/23/2018" "4:13:05" "PM" use excel function text to columns

      2.set a formula =IF($C2="PM",$B2+$D2,$B2) then got correct time

      3.load sheet2 to tableau

      4.change data type to String from Date & Time in column (12:00:00 & correct time)

      5.create a calculation1 = [DATE]+" "+[Correct time]

      6.create a calculation2 = DATEPARSE("MM/dd/yyy hh:mm:ss",[Calculation1])

      7.finally

      I put a new attachment called Tableau forum_new answer.twbx

      ==============================================================

      Thanks many people help me a lot for this question

      Thanks Ritesh Bisht @ANUPAM MEHTA @TUSHAR MORE Mahfooj Khan Ombir Rathee

      I got many experience at dateparse and date & time format

      =============================================================

      I dont know how to close this can someone share information

        1 2 Previous Next