DateTime value Format For Url - CSharp System

CSharp examples for System:DateTime Format

Description

DateTime value Format For Url

Demo Code


using System;/*from   ww w . j a  va2  s  .co m*/

public class Main{
        public static string FormatForUrl(this DateTime date)
        {
            return string.Format("{0:yyyy}/{0:MM}/{0:dd}", date);
        }
}

Related Tutorials