Sharepoint 2010 Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint 2010       RSS Feeds

Inconsistent interpretation of dates (US vs UK format)

  Asked By: Stephen    Date: Jul 12    Category: Sharepoint 2010    Views: 12968

Depending on the days value for a date Sharepoint is interpreting it as either US or UK format, should be UK everytime. Anyone else had this or can suggest what we need to check?

We have a list which contains a 'DueDate' column and want to display alerters on a dataview embedded in an aspx page based on this in relation to the current date. We do this with two calculated columns called GoAmberOn and GoRedOn (for RAG) and conditional formatting (also using Status for 'Blue' when an item is completed).

We show or hide the alerters by comparing these to [CurrentDate]. The problem we have is that we are using UK format dates (dd/MM/yyyy) through out (we're in the UK), so 12/07/2011 (the day I'm writing this) is 12th July 2011, but the system will interpret any date which could be a legal US format date (MM/dd/yyyy) as a US format date (so 12/07/2001 would be 7th December 2011) and any date that is not a legal US format date as a UK format date (so 13/07/2011 would be 13th July 2011). Obviously when doing comparisons it's important that the dates be interpreted consistently. For example is the DueDate for an item is today (12th July 2011) and we look at the page tomorrow we would expect to see an Amber alerter and on the 14th we'd expect to see a Red alerter (there's a one day margin each way on DueDate so the day before and item is due it goes Amber and the day after it was due it goes Red). What we actually see is Green as the system thinks we've got around 5 months left.

We've used the same sort of conditional formatting on Sharepoint 2007 many times without problem so we're very confident that our filters are correct.

The locale setting in sharepoint are all UK.

We're having the locale setting on the servers checked to make sure they're not US.

Anyone else had this? Anywhere else we should be looking?

I have blogged the whole story to date here: sharepointbydummies.blogspot.com/.../...-time.html

I have found one other person (in Australia) who has reported the same issue. They seem to believe it is a bug in Sharepoint.





No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Inconsistent interpretation of dates (US vs UK format) Or get search suggestion and latest updates.