Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Afficher les differents format de date en français

énumérer,toutes,les,cultures,disponibles
{filelink=19575}

cusing System;
using System.Globalization;
using System.Threading;
 
class formatDateFr {
  static void Main(string[] args) {
      CultureInfo cultureFR = new CultureInfo("fr-FR");
      DateTime date = System.DateTime.Now;
 
      Thread.CurrentThread.CurrentCulture = cultureFR;
 
      Console.WriteLine(date.ToLongDateString());
      Console.WriteLine(date.ToLongTimeString());
      Console.WriteLine(date.ToShortDateString());
      Console.WriteLine(date.ToShortTimeString());
 
   }
}

No comments yet.

Leave a Comment