Microsoft Content Management Server - Date Format

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > August 2005 > Date Format





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Date Format
mick marriott

2005-08-03, 7:49 am

We are having problems with one of our pages in MSCMS 2002 SP1a
The data in the DB is in UK Date format, but when it is displayed on the
page a conversion is taking place and it is being shown in US format.
We have checked the server and cannot see where this setting is declared.
Is there a file I need to amend to set the right date format for the site.

Cheers
Stefan [MSFT]

2005-08-03, 5:51 pm

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...
> We are having problems with one of our pages in MSCMS 2002 SP1a
> The data in the DB is in UK Date format, but when it is displayed on the
> page a conversion is taking place and it is being shown in US format.
> We have checked the server and cannot see where this setting is declared.
> Is there a file I need to amend to set the right date format for the site.
>
> Cheers



mick marriott

2005-08-04, 7:54 am

Hi Stefan
It is text displayed in a placeholder that is read from a SQL 2000 database.
The text is in the correct format in the database but not when displayed.
It also looks as if CMS was installed without the regional settings of the
operating system being setup correctly.

Cheers

Mick

"Stefan [MSFT]" wrote:

> 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...
>
>
>

Lim Mei Ying [MVP]

2005-08-04, 7:54 am

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...
>
>



Stefan [MSFT]

2005-08-04, 5:56 pm

Hi Mick,

what type of placeholder is this?
What placeholder control are you using?
What type of conversion does this placeholder control do? Using which
conversion method?

Cheers,
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:876545A6-56A5-41E6-99B0-520D270AB519@microsoft.com...[vbcol=seagreen]
> Hi Stefan
> It is text displayed in a placeholder that is read from a SQL 2000
> database.
> The text is in the correct format in the database but not when displayed.
> It also looks as if CMS was installed without the regional settings of the
> operating system being setup correctly.
>
> Cheers
>
> Mick
>
> "Stefan [MSFT]" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com