Changing the Date Format Using Format(Date.Today, "mm/dd/yyyy") in ASP.Net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mgpsivan
    New Member
    • Feb 2007
    • 13

    Changing the Date Format Using Format(Date.Today, "mm/dd/yyyy") in ASP.Net

    Hi,
    i have form in Asp.net(2003) in that i've to change the format of the date by the following statement

    Format(Date.Tod ay, "dd/mm/yyyy")

    but when i give this code the month part displays as 00 i.e i get the output as the folowing for eg:

    "18/00/2007" can any one help me in changing the format...
    Thanks in Advance.....
    Sivan.G.....
  • phvfl
    Recognized Expert New Member
    • Aug 2007
    • 173

    #2
    Use "dd/MM/yyyy" as the format. "mm" (lowercase) is minutes not month

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Have you tried - Format(Date.Tod ay, "dd/MM/yyyy")?

      Comment

      • mgpsivan
        New Member
        • Feb 2007
        • 13

        #4
        Originally posted by phvfl
        Use "dd/MM/yyyy" as the format. "mm" (lowercase) is minutes not month
        Thank u very much..... I got it.... Thanks for u r reply...

        Comment

        • mgpsivan
          New Member
          • Feb 2007
          • 13

          #5
          Originally posted by kenobewan
          Have you tried - Format(Date.Tod ay, "dd/MM/yyyy")?
          Thank u very much.... i got it.. Thanks for ur quick reply..

          Comment

          • phvfl
            Recognized Expert New Member
            • Aug 2007
            • 173

            #6
            No problem at all. Always glad to help

            Comment

            Working...