Terry Rogers
asked on
Date / Time format from SQL Row in Powershell Script
I have a script that executes an SQL query and then populates the data into a HTML table, before email it to a set of recipients.
The first column however shows dates like such: 11/28/2016 12:52:10
How do I go about formatting the date so it reads day, month, year, time ?
foreach ($row in $DataSet.Tables[0].Rows)
{
$body += "<tr>
<td>" + $row[1] + "</td>
<td>" + $row[2] + "</td>
<td>" + $row[3] + "</td>
<td>" + $row[9] + "</td>
<td>" + $row[10] + "</td>
</tr>"
}
The first column however shows dates like such: 11/28/2016 12:52:10
How do I go about formatting the date so it reads day, month, year, time ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER