CSharp examples for System:DateTime Year
To Year Month Day Format
// Copyright (c) Microsoft Corporation. All rights reserved. using System;/*from w w w .j a v a2 s . c o m*/ public class Main{ public static string ToYearMonthDayFormat(this DateTime dateTime) { return dateTime.ToString("yyyy-MM-dd"); } }