Convertir Date et Heure Système en objet ‘DateTime’

Author:


{filelink=19649}

using System;

class HeureSE
{

    public static void Main()
    {
        DateTime dateActu = DateTime.Now;
        //Obtenir heure Système
        long heureSys = dateActu.ToFileTime();
        // Convertir Heure Système en objet dateTime
        DateTime objetDateTime = DateTime.FromFileTime(heureSys);
        Console.WriteLine("DateTime.FromFileTime() = " + objetDateTime);

    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *