skip to main | skip to sidebar

A New Age: Silverlight

mardi 24 mars 2009

Formatage de la date en C#

lblMessage.Text = DateTime.Now.ToString();
Cette instruction affiche la date :

24/03/2009 12:46:54

Pour afficher cette date selon le format jj/MM/aaaa:

lblMessage.Text = DateTime.Now.ToString("dd/MM/yyyy");

Réference:
http://msdn.microsoft.com/en-us/library/system.globalization.datetimeformatinfo(VS.71).aspx

Publié par RAMZI Sanaa à 12:52

Aucun commentaire:

Enregistrer un commentaire

Article plus récent Article plus ancien Accueil
Inscription à : Publier les commentaires (Atom)

Liens interessants

  • http://bettysus.blogspot.com/
  • http://odinia.blogspot.com/
  • http://oudinia.blogspot.com
  • http://mounafia.blogspot.com/
  • http://younesouhbi.blogspot.com/

Archives du blog

  • ►  2010 (12)
    • ►  octobre (3)
    • ►  septembre (1)
    • ►  août (1)
    • ►  avril (4)
    • ►  mars (1)
    • ►  février (2)
  • ▼  2009 (10)
    • ►  août (1)
    • ►  juin (1)
    • ►  mai (1)
    • ▼  mars (2)
      • Formatage de la date en C#
      • Upload de fichiers avec asp.net 2.0 : taille du f...
    • ►  janvier (5)
  • ►  2008 (18)
    • ►  décembre (2)
    • ►  novembre (2)
    • ►  octobre (1)
    • ►  août (2)
    • ►  juillet (2)
    • ►  mai (5)
    • ►  avril (1)
    • ►  février (1)
    • ►  janvier (2)

Qui êtes-vous ?

RAMZI Sanaa
Morocco
Afficher mon profil complet