-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: DeepakG_MSFT
Message 5 in Discussion

Hi Ajay,   There are several ways of doing it. The most common way is to use 
DateTime.ToString or String.Format. The values produced by them are dependent on 
user's current culture setting. Here is an example: (since you want UK style date, I 
pass a CultureInfo instance corresponding to the en-GB culture)   using System;
using System.Globalization;
class X
{
 public static void Main(string[] str)
 {
  DateTime today = DateTime.Today;
  Console.WriteLine(today.Day + " " + today.Month + " " + today.Year);
  Console.WriteLine(today.ToString("d",new CultureInfo("en-GB")));
  Console.WriteLine(String.Format(new CultureInfo("en-GB"),"{0:d}",today));
 }
}   Several other easy ways of doing it. Did you have the courtesy of searching the 
usergroup archive before posting the question? Just a search on "DateTime" gave me at 
least 3 useful results...    
http://www.mail-archive.com/cgi-bin/htsearch?method=and&format=short&config=bdotnet_groups_msn_com&restrict=&exclude=&words=DateTime
     HTH, Deepak

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to