Forum Discussion
TheAndy
5 years agoNew Member
Accepted datetime format?
So background: I have a dataset that updates daily via powershell. Currently the "Date" column in the table is actually stored as a string. This works but it's causing sorting issues (like 01/02/2020...
- 5 years ago
NVM, worked it out. I forgot that adding -format to Get-Date in PS turns the output into a string rather than a datetime, so of course the data types wouldn't match.
[datetime]$date = Get-Date -format "whatever format you like"worked first time.
TheAndy
5 years agoNew Member
NVM, worked it out. I forgot that adding -format to Get-Date in PS turns the output into a string rather than a datetime, so of course the data types wouldn't match.
[datetime]$date = Get-Date -format "whatever format you like"
worked first time.