How to get month appear as short form not as Full month

T

TalalSaleem

How I can get month appears in 3 digit e.g. Jan, Feb not as full January,
February.

I wants this result to appears:
Saturday, Feb 02, 2008

But unfortunately I get this result:
Saturday, February 02, 2008

Here are my codes:

System.DateTime OrderDate = new System.DateTime();

String LongTimeString = "";
String DateToString = "";
String ShortTimeString = "";
String LongDateString = "";

int Daysinmonth = 0;

OrderDate = System.DateTime.Now;

LongTimeString = OrderDate.ToLongTimeString();
Daysinmonth = System.DateTime.DaysInMonth(OrderDate.Year, OrderDate.Month);

DateToString = OrderDate.ToString();
ShortTimeString = OrderDate.ToShortTimeString();
LongDateString = OrderDate.ToLongDateString();


Label1.Text=LongDateString;
 
M

Martin Honnen

TalalSaleem said:
How I can get month appears in 3 digit e.g. Jan, Feb not as full January,
February.

I wants this result to appears:
Saturday, Feb 02, 2008

But unfortunately I get this result:
Saturday, February 02, 2008

Here are my codes:

System.DateTime OrderDate = new System.DateTime();

OrderDate.ToString("dddd, MMM dd, yyyy")
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top