some help please, is there a way to change ISO date in SOURCE to normal Date Year/Month/Day?



  • So in the SOURCE

    i get in many one JSON line many of purchaseDate as JSON which is a one-line
    but it look like this

    ","purchaseDate":"20120821T191447.000Z","
    ","purchaseDate":"20130329T150603.000Z","
    ","purchaseDate":"20120718T002416.000Z","
    

    But as simple of full part of the line, it looks like this and many of it in one line JSON Type

    {"itemId":29,"example":"example","purchaseDate":"20200602T235645.000Z","quantity":1,"example":1,"example":"20200604T160537.000Z","example":"887853ea-4897-4350-9107-4vv40ygbz535","example":"4fdjj0i3-o23u-7h1g-9351-b750ff124ff7","example":false,"example":false,"example":false},{"itemId":31,"example":"example","purchaseDate":"20130129T165309.000Z","quantity":1,"example":1,"example":"20130129T182246.000Z","example":"887853ea-4897-4350-9107-4vv40ygbz535","example":"4fdjj0i3-o23u-7h1g-9351-b750ff124ff7","example":false,"example":example,"example":false},
    

    i was wonder if there a way i can change this ISO date to be like 2012/08/21
    for all lines that have ","purchaseDate":"
    but i also want to get the item Id along with it

    I Tried with Parse and Function but i couldn't make it happen 😞

    so it's at the end be like this in Capture or even if in .txt file is ok

    ID:29 PurchaseDate: 2020/06/02
    ID:31 PurchaseDate: 2013/01/29

    Thanks in advance for any who help.



  • The long way but works.

    https://prnt.sc/u34ek9

    SET VAR "LIST" "purchaseDate\":\"20120821T191447.000Z"
    
    PARSE "<LIST>" LR "purchaseDate\":\"" "T" -> VAR "STRING" 
    
    FUNCTION Substring "0" "4" "<STRING>" -> VAR "1" 
    
    FUNCTION Substring "4" "2" "<STRING>" -> VAR "2" 
    
    FUNCTION Substring "6" "2" "<STRING>" -> VAR "3" 
    
    FUNCTION Constant "<1>/<2>/<3>" -> CAP "DATE" 
    
    

Log in to reply