I am looking at the "Aggregate List Items Across Sites" example and want to format the "Created" field so it appears as MM/dd/yyyy hh:mm [AM|PM] (or the standard "General" format in .NET). When I use the following statement:
$dataRow.get_item("Created").ToString("g")
or,
$dataRow.get_item("Created").ToString("MM/dd/yyyy hh:mm tt")
the exact string is output with the page instead of being formatted. I pulled the ToString() approach from the SQL Query example. What is the correct way to accomplish this?
1 Comments