I have 3/12/16 as a value in CSV file. It’s detected as date as expected and it’s considered to be 12 March 2016. I want it to be detected as 3 December 2016 instead. How to achieve this ?
Also 2-Jan-16 is detected as Date type but not 2-Jan.
Well, DateTime values are dependent upon your default locale set of your system/environment. You can specify some another region(locale) whose order is day/month/year, such as below code:
e.g
Sample code:
[Java]
TxtLoadOptions loadOptions = new TxtLoadOptions(LoadFormat.CSV);
I am afraid, by default, this might not be possible while loading/parsing the CSV file format directly and you got to set the relevant region (e.g which specifies in “dd/mm/yy” etc. for your needs) for your underlying DateTime values.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.