2 Replies Latest reply on Apr 30, 2018 5:37 AM by DanSah

    PI OLEDB timestamp format


      Hi guys,

      I am facing an issue with the PI OLEDB driver.

      I am loading dates and timestamps as strings from PI into Matlab and then parsing them to Matlab timestamps. It seems like the string I get from PI is formatted using my windows date settings, which makes it a bit tricky for me to share my program with my colleagues sitting at different locations.


      I have tried to format the timestamp in the SQL call based on another forum discussion but i couldn't get it to work:

      FORMAT(starttime, ''YYYY-MM-DD hh:mm:ss'') -> NaN while starttime gives me the string '2016-05-12 05:10:08' (in agreement with windows date format)


      How do I do to force a format of the string so I can tell Matlab what to expect regardless of the windows settings?


      Thanks in advance,