Date Format
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Date Format




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Date Format  
mick marriott


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 12:49 PM

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





[ Post a follow-up to this message ]



    Re: Date Format  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-03-05 10: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







[ Post a follow-up to this message ]



    Re: Date Format  
mick marriott


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-04-05 12:54 PM

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: [url]http://tinyurl.com/6zj44[/url
]
> ----------------------
>
>
> "mick marriott" <mickmarriott@discussions.microsoft.com> wrote in message
> news:F7B3DB95-70ED-4EA4-9F67-03F6F40FC698@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Date Format  
Lim Mei Ying [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Re: Date Format  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-04-05 10: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:
> 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:54 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register