DATETIMEPATTERN

K

Karunakararao

Hi all
How can i get the "Short Date Format" from regional and language
options
Like "MM/dd/yyyy"
how can get this type of format based regional settings;
I wnat to show this format in web application.

Iam using this code
Label1.Text = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
Iam getting this output ="M/d/yyyy";

When ever chage the regional optional settings It's not changing when i was
used this code.


Regards
Venu
 
K

Karunakararao

Here Iam using in ASP.NET Web application
Here it is not taking the these settings
I want Format of like "MM/dd/yyyy"
Regards
Venu
 
V

Vaibhav

Hi,

You can try this one...
it worked for me

CONVERT(nvarchar(20), EnteredDate, 105)

Vaibhav
 

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