g_r_a_robinson Posted March 9, 2004 Posted March 9, 2004 I am simply trying to get the following to return the date in the English(Australian) format by using in my Page_load: <code> Session.LCID = 3081; </code> I then do : <code> DateTime TodaysDate = System.DateTime.Now; </code> expecting to receive my date as dd/MM/yyyy but I keep getting mm/dd/yyyy, IE the american format. I checked my globalisation settings on my machine and they are English(Australia) but I presume this shouldn't matter since I used the Session.LCID = 3081;. Anyone help me? Quote
*Gurus* Derek Stone Posted March 9, 2004 *Gurus* Posted March 9, 2004 Set the current culture using the [msdn]System.Threading.Thread[/msdn].CurrentThread.CurrentCulture and [msdn]System.Threading.Thread[/msdn].CurrentThread.CurrentUICulture properties. Setting Session.LCID (which maps to [msdn]System.Globalization.CultureInfo[/msdn].LCID) has little affect on formatting of dates and times. Quote Posting Guidelines
g_r_a_robinson Posted March 10, 2004 Author Posted March 10, 2004 thanks for that nut i'm just not sure how to implement it in my code. Could you give me an example of how I might use what you gave me set the settings for UK. Quote
*Gurus* Derek Stone Posted March 10, 2004 *Gurus* Posted March 10, 2004 System.Threading.Thread.CurrentThread.CurrentUICulture = New CultureInfo(3081) Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.