How to Read Dates before 1970

Comments

1 comment

  • Avatar
    John Escobar (Edited )

    Thanks to Oleksandr Burkov I found a workaround.  My problem was solved in two steps:

    Context: Data is pulled from Dynamics365 Online through a CData Connector into Sisense.  Dates are stored as  EPOCH Unix dates.  Therefore, dates prior 01/01/1970 are read as 0.

    • First Step.  Cast the date attribute as VARCHAR when loading the entity.  See the example below:

     

    • Second step.  Once in the Elasticube Manager you must extract year, month and date and convert them into integer numbers.  Then, use the function CreateDate() to create the new date.  I used David Hogeg's approach to create the date.  Nonetheless, the approach was adapted to get year, month, day from different places in the string (Hogeg's assumes a YYYYMMDD format, while VARCHAR format is YYYY-MM-DDT....).  See the image below:

    You will find David Hogeg's comment here: https://support.sisense.com/hc/en-us/articles/230646648-Convert-Text-Date-to-Date-time-format 

    I hope it helps!

     

    John

    0
    Comment actions Permalink

Please sign in to leave a comment.