08-04-05 12:54 PM
Hi
The date and time format follows the information in the regional settings of
the server. Based on your description, it seems that the value returned by
System.Globalization.CultureInfo.CurrentCulture.Name property would probably
be "en-US". You could modify this by either
1. changing the current culture or
2. manually specifying the date format.
To change the current culture, you could set the date format in the Control
Panel | Regional and Language Options dialog. Trouble is, we are working
with a web app, so you've got to change these settings for the ASP.NET
worker process (for details, see: http://support.microsoft.com/?id=306044 -
article is also applicable for ASP.NET). You could also change the culture
settings using code:
System.Threading.Thread.CurrentThread.CurrentCulture = new
System.Globalization.CultureInfo("en-GB", false);
or, set it in the web.config file:
<configuration>
<system.web>
<globalization requestEncoding="utf-8" responseEncoding="utf-8"
culture="en-GB"/>
</system.web>
</configuration>
There's also another method that involves changing the Session.LCID
property. More on that method here:
http://msdn.microsoft.com/library/d...3fdbb00d507.asp
Alternatively, you could use the DateTime.ToString() method to define the
specific format that you wish to display the date in.
e.g. posting.LastModifiedDate.ToString("dd MMM yyyy");
---
regards
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Book: http://www.packtpub.com/book/mcms
Contact: meiyinglim@hotmail.com
---
"Stefan [MSFT]" <stefang@online.microsoft.com> wrote in message
news:ueWue5EmFHA.1416@TK2MSFTNGP09.phx.gbl...
> Hi Mick,
>
> are you talking about a date in one of the MCMS object properties like the
> start date or the last modified date?
> Or are you talking about a date stored in clear text in a custom property
> or in a placeholder?
>
> Thanks,
> Stefan
>
> --
> This posting is provided "AS IS" with no warranties, and confers no rights
>
> New to MCMS?
> Check out this book: Building Websites Using MCMS:
> http://tinyurl.com/6zj44
> ----------------------
>
>
> "mick marriott" <mickmarriott@discussions.microsoft.com> wrote in message
> news:F7B3DB95-70ED-4EA4-9F67-03F6F40FC698@microsoft.com...
>
>
[ Post a follow-up to this message ]
|