Question:
I can format the time of the files with the following command:
1 2 |
Get-ChildItem Dropbox | Get-Date -format "yyyy-MM-dd hh:mm" |
I can get the CreationTime of the files with the following command:
1 2 |
Get-ChildItem Dropbox | Select-Object CreationTime |
They blow up when I combine them together. How can I get the creation time in a format I desire?
Answer:
You need to expand the CreationTime
property:
1 2 3 4 |
Get-ChildItem Dropbox | Select-Object -ExpandProperty CreationTime | Get-Date -f "yyyy-MM-dd hh:mm" |