Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UK and US Dates

Status
Not open for further replies.

Badgers

Programmer
Nov 20, 2001
187
US
Hi

I have two servers, one in UK and the other in US.

They are set to run in the timezones in each country via the config file.

I read in dates from an xml file (UK format) and I'm comparing the month and year to the current month and year from the DB.

For eg;

if (periodRow.PublicationDate.Month == DateTime.Parse(n.Attributes["PublicationDate"].Value).Month & periodRow.PublicationDate.Year == DateTime.Parse(n.Attributes["PublicationDate"].Value).Year)
{
//Month current Month to return PublicationID
PubID = int.Parse(n.Attributes["id"].Value);
}


This code works on the UK, but not on the US Server, does anyone know of a conversion function or something so it would work in both.

Thanks

Tim.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top