Question: I am working with Silverlight and I am getting a problem. In my Database I have stored some dates with a format like this yyyy/mm/dd 00:00:00, which means that I store only the year, month and day, getting the time to 00:00:00.

When the client performs an action and sends to the server I get the DateTime.Today which will keep the format of my database date, but when it is sendind I get yyyy/mm/dd 22:00:00, so when my server side function gets the date, it will return no values from the database. 

How can I fix this to get the correct datetime?

Thank you

Answer: 
Use UTC times to make sure you don't run into timezone issues.

You can see if the DateTime is UTC or local based by checking the Kind property, and you can get the current UTC time by DateTime.UtcNow.
In addition to storing UTC time in the database, you can hard set the time to 12:00:00 for all date values by using the Date property of the DateTime class.

```
DateTime.UtcNow.Date

```

You can present the date to the user in their local timezone using the ToLocalTime method:

```
DateTime.ToLocalTime().Date

```

I'm sure every database engine has a similar function, but the SQL Server function to get UTC date is (surprisingly enough):

```
GETUTCDATE()

```

I hope this helps.