\n Hi, and welcome to the PowerShell forum! \n\n\nDon’t apologize for being a “noob” or “newbie” or “n00b.” There’s just no need – nobody will think you’re stupid, and the forums are all about asking questions. Just ask!\nUse a descriptive subject. Don't say \"Need help\" or \"PowerShell Help\", actually summarize what the problem is. It helps the rest of us keep track of which problem is which.\nDon’t post massive scripts. We’re all volunteers and we don’t have time to read all that, nor will we copy, past…\n <\/blockquote>\n<\/aside>\n\n <\/p>","upvoteCount":0,"datePublished":"2020-05-07T18:50:40.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/2","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"
When you use ‘export-csv’ you can use the paramter ‘-NoTypeInformation’ that will get rid of the first line.<\/p>\n
export-csv \"C:\\telegraf\\csv\\useracctexpire.csv\"\n\n#TYPE Selected.Microsoft.ActiveDirectory.Management.ADUser\n\"Displayname\",\"ExpiryDate\"\n\"FirstName LastName\",\"2020-07-07T08:39:00Z-05:00\"\n\n# vs\nexport-csv \"C:\\telegraf\\csv\\useracctexpire.csv\" -notypeinformation\n\n\"Displayname\",\"ExpiryDate\"\n\"FirstName LastName\",\"2020-07-07T08:39:00Z-05:00\"\n\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2020-05-07T18:53:55.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/3","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"\n\n
<\/div>\n
mattroell:<\/div>\n
\nThe ExpiryDate is not in the correct format \n“2020-07-07T08:39:00Z-05:00”<\/p>\n<\/blockquote>\n<\/aside>\n
well, what format do you want it to be in?<\/p>","upvoteCount":0,"datePublished":"2020-05-07T18:54:37.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/4","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"
It needs to be in either Go or Unix<\/p>","upvoteCount":0,"datePublished":"2020-05-07T18:57:01.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/5","author":{"@type":"Person","name":"mattroell","url":"https://community.spiceworks.com/u/mattroell"}},{"@type":"Answer","text":"\n\n
<\/div>\n
mattroell:<\/div>\n
\nIt needs to be in either Go or Unix<\/p>\n<\/blockquote>\n<\/aside>\n
That makes no sense. What format is ‘Go’ or ‘Unix’<\/p>\n
Can you give a sample what you want it to look like?<\/p>","upvoteCount":0,"datePublished":"2020-05-07T18:58:08.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/6","author":{"@type":"Person","name":"Neally","url":"https://community.spiceworks.com/u/Neally"}},{"@type":"Answer","text":"
Sorry about that<\/p>\n
Go: 2006-01-02T15:04:05Z07:00<\/p>\n
Unix: 1588860000<\/p>\n
Does that help?<\/p>","upvoteCount":0,"datePublished":"2020-05-07T19:01:22.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/7","author":{"@type":"Person","name":"mattroell","url":"https://community.spiceworks.com/u/mattroell"}},{"@type":"Answer","text":"
That’s exactly what I’m looking for, thank you for all your help.<\/p>","upvoteCount":0,"datePublished":"2020-05-07T19:26:39.000Z","url":"https://community.spiceworks.com/t/powershell-format-date-time-into-go-or-unix/761959/9","author":{"@type":"Person","name":"mattroell","url":"https://community.spiceworks.com/u/mattroell"}}]}}
Neally
(Neally)
May 7, 2020, 6:50pm
2
Welcome!
If you post code, please use the ‘Insert Code’ button. Please and thank you!
Hi, and welcome to the PowerShell forum!
Don’t apologize for being a “noob” or “newbie” or “n00b.” There’s just no need – nobody will think you’re stupid, and the forums are all about asking questions. Just ask!
Use a descriptive subject. Don't say "Need help" or "PowerShell Help", actually summarize what the problem is. It helps the rest of us keep track of which problem is which.
Don’t post massive scripts. We’re all volunteers and we don’t have time to read all that, nor will we copy, past…