|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Converting String to dateHi,
I have a date: "7/10/2006" I convert it with this: Convert.ToDateTime(DocumentDatum) Now I get this: "10/7/2006" How can I make sure that it doesn't change month & day? Thanks Joris Here's one way
Debug.WriteLine(Convert.ToDateTime("12/3/2006", New Globalization.CultureInfo("en-GB")).ToShortDateString) Show quoteHide quote "Joris De Groote" <joris.degro***@skynet.be> wrote in message news:%23DmB2Z6XGHA.4684@TK2MSFTNGP03.phx.gbl... > Hi, > > I have a date: "7/10/2006" > I convert it with this: Convert.ToDateTime(DocumentDatum) > Now I get this: "10/7/2006" > How can I make sure that it doesn't change month & day? > > Thanks > Joris > > "Joris De Groote" <joris.degro***@skynet.be> schrieb: Check out 'DateTime.ParseExact'.> I have a date: "7/10/2006" > I convert it with this: Convert.ToDateTime(DocumentDatum) > Now I get this: "10/7/2006" > How can I make sure that it doesn't change month & day? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
How to release a free source code?
Dynamically open forms, reports or call functions Database update problems. How to convert a regular VB app into a service to run on a Windows 2003 server? Crypto Question FileUpload to SQL Open Printers Folder An idea to save learning time. String Tokenizing - Help! Email Issue due to Antivirus (posting again) |
|||||||||||||||||||||||