Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Affichage Heure en format court et long


{filelink=19648}

using System;
 
public class DateLongCourte
{
 
    public static void Main()
    {
        DateTime maintenant = DateTime.Now;
        // Convertir en temps Windows
        long heureWindows = maintenant.ToFileTime();
        DateTime dateHeure = DateTime.FromFileTime(heureWindows);
 
        Console.WriteLine("dateHeure.ToLongTimeString() = " + dateHeure.ToLongTimeString());
        Console.WriteLine("dateHeure.ToShortTimeString() = " + dateHeure.ToShortTimeString());
    }
}

No comments yet.

Leave a Comment