Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
2 years ago

Dates format issue with LoadCustomTableUsingDelimitedFile function

Hi, I have an application DB table with a date column and I am using the LoadCustomTableUsingDelimitedFile function to load a CSV file to the table. The xfDateTime# token is assigned to the column ...
  • AndreaF's avatar
    2 years ago

    The workaround I have come up with is to recreate the application table by making sure the date column is in fact of varchar type. Then I have updated the LoadCustomTableUsingDelimitedFile function to use the xfText# token for that column. When querying the table, for example to insert the value to a date column of another table, I am using the "CONVERT(datetime, ColumnName, 105)" SQL function, where the 105 represent the date style dd-mm-yyyy.

  • JackLacava's avatar
    JackLacava
    2 years ago

    no, but the first parameter, si, is a session object representing a logged-in user, and it has a .Culture property that contains the user's culture setting. So in theory, one could open a brand new connection through the client api using a different user (who would have a different culture), and then pass that si object to the call. But it's a lot of work.