Forum Discussion
kamleshyadav95
Jul 09, 2024Copper Contributor
date format getting changed from yyyy-mm-dd hh:mm:ss:fff to dd-mm-yyyy hh:mm
Hi All, I am trying to export data from sql server database to csv. data is getting export perfectly in csv file but date format is getting from "yyyy-mm-dd hh:mm:ss:fff" to "dd-mm-yyyy hh:mm". ...
LainRobertson
Jul 10, 2024Silver Contributor
That's unexpected and not in line with my screenshot from above, which does not feature the extra "HH".
What happens if you run the following line after the original three you've repeated above?
$host.CurrentCulture.DateTimeFormat | Format-List -Property *pattern;
You should see an enumeration of the various formats as shown below, with the change in format reflected in the FullDateTimePattern property:
Cheers,
Lain
kamleshyadav95
Jul 10, 2024Copper Contributor
Hi Lain,
Yes, Agree I can see that but not sure why this is not coming correctly.
Kamlesh
Yes, Agree I can see that but not sure why this is not coming correctly.
Kamlesh