Results 1 to 4 of 4

Thread: formating a date to dd/mm/yyyy format

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    formating a date to dd/mm/yyyy format

    Hello,

    I am using a DateTime variable. But l want to change the format of the shortDateString from mm/dd/yyyy to the new format of dd/mm/yyyy.

    I used the code below using, using System.Globalization. However, it won't change to this new format of dd/mm/yyyy

    DateTime today = Convert.ToDateTime(DateTime.Today.ToShortDateString());
    DateTimeFormatInfo dateFormat = new DateTimeFormatInfo();
    dateFormat.ShortDatePattern = "dd/mm/yyyy";
    today.ToString(dateFormat);

    Can anyone help with this.

    Many thanks in advance,

    Steve
    Last edited by steve_rm; Dec 11th, 2004 at 05:26 AM.
    steve

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width