Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C# date format

Posted on 2008-10-29
2
Medium Priority
?
943 Views
Last Modified: 2013-12-17
Hi,
I have to read the users regional settings using windows Application  and get the Date format either UK or US and send the date format as parameter to the stored procs either mm/dd/yyyy or dd/mm/yyyy
how can i write this function
0
Comment
Question by:dotnet0824
2 Comments
 
LVL 12

Accepted Solution

by:
techExtreme earned 1000 total points
ID: 22829347
Hi, go thru this link:
http://msdn.microsoft.com/en-us/library/aa325261.aspx
It deals with date and culture.

Hope it helped.
0
 
LVL 11

Expert Comment

by:Anurag Agarwal
ID: 22829384
Hi,

Try System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat

Anurag
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question