Re: Date Convert
From: Ignacio Machin \( .NET/ C# MVP \) ("Ignacio)
Date: 12/13/04
- Next message: Suresh: "Re: Problems with accessing ASP.NET Session values in ASP"
- Previous message: Raghu Raman: "How can i run my project after copied from one machine."
- In reply to: Islam Elkhayat: "Date Convert"
- Next in thread: Rajagopal Pasupuleti: "Re: Date Convert"
- Reply: Rajagopal Pasupuleti: "Re: Date Convert"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 13 Dec 2004 08:43:01 -0500
Hi,
You can convert a DateTime to string as desired using DateTime.ToString() ,
like this:
DateTime.Today.ToString( "dd/MM/yy", DateTimeFormatInfo.InvariantInfo );
In a similar way you can use DateTime.Parse or DateTime.ParseExact
Cheers,
-- Ignacio Machin, ignacio.machin AT dot.state.fl.us Florida Department Of Transportation "Islam Elkhayat" <islamegy@yahoo.com> wrote in message news:%23yLPfhR4EHA.524@TK2MSFTNGP09.phx.gbl... > In my C# Webapplication.. > I enter the date in a textbox using popup Calender in the format > MM/dd/yyyy.. > when i retrieve date from Sql server for updating using datarow to fill > the textbox the date format dd/MM/yyyy hh-mm-ss i want to convert it back > to the original format & ommit the time.. > > How can i convert this back so i void the exception if user didn't change > date in the update form?? > Any help plz > > >
- Next message: Suresh: "Re: Problems with accessing ASP.NET Session values in ASP"
- Previous message: Raghu Raman: "How can i run my project after copied from one machine."
- In reply to: Islam Elkhayat: "Date Convert"
- Next in thread: Rajagopal Pasupuleti: "Re: Date Convert"
- Reply: Rajagopal Pasupuleti: "Re: Date Convert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|