formating date

Discussion in 'ASP .Net' started by =?Utf-8?B?YW1qYWQ=?=, Jun 21, 2006.

  1. how to change date format with asp.net 1.1 using c# code like

    03/12/1955 00:00:00 to 03/12/1955

    thanks can i overload string function like

    public override string ToString()
    {
    return(String.Format("birthDate: {d}", this._BirthDate.ToString()));
    }
    is that the correct syntax seem not to be as its not working thanks
     
    =?Utf-8?B?YW1qYWQ=?=, Jun 21, 2006
    #1
    1. Advertising

  2. String.Format("{0:dd/MM/yyyy}", DateTime)
    or

    String.Format("{0:MM/dd/yyyy}", DateTime)


    Search the help for DateTimeFormatInfo to have all the possibilities.

    Regards,
    Lionel Schiepers.


    "amjad" <> wrote in message
    news:...
    > how to change date format with asp.net 1.1 using c# code like
    >
    > 03/12/1955 00:00:00 to 03/12/1955
    >
    > thanks can i overload string function like
    >
    > public override string ToString()
    > {
    > return(String.Format("birthDate: {d}", this._BirthDate.ToString()));
    > }
    > is that the correct syntax seem not to be as its not working thanks
     
    Lionel Schiepers, Jun 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Carnahan

    Help on date formating

    John Carnahan, Nov 19, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    324
    Alvin Bruney
    Nov 19, 2003
  2. Russ
    Replies:
    2
    Views:
    303
  3. Fabiano

    Date Formating

    Fabiano, Jan 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    354
    André Almeida Maldonado
    Jan 14, 2004
  4. JAPHET

    Data Grid Date Formating

    JAPHET, Nov 2, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    472
    Scott Allen
    Nov 3, 2004
  5. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,369
    Michael Borgwardt
    May 30, 2004
Loading...

Share This Page