Not sure what the issue is, but I get ms back just fine using your code. Are you sure the issue isn't somewhere else? The resolution of DateTime is something like 15ms (which mimics the Windows timer resolution, but not the HighPerformanceTimer function(s) resolution). You can actually get better resolution, but it's not guaranteed, and you can get much worse if your CPU is bogged down.
I see you are not getting anything like what you coded: vis yyyy-MM-dd and you get 05/04/2011. Check your regional settings for date and time thru to milliseconds. I had this happen once before. If not, well, hey it was a bad guess. Have fun. Google this. I think I got the answer online.
Bookmarks