Working with DateTime - Day 2 - Part 2
- Posted: Nov 11, 2010 at 5:45 PM
- 27,192 Views
- 8 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
When working with Silverlight applications for the Windows Phone 7, you'll often need to work with a date and/or time. This video demonstrates how to work with the DateTime class and TimeSpan class to add dates, calculate differences in time, retrieve parts of a DateTime object, format for display, and more.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation,
please create a new thread in our Forums,
or
Contact Us and let us know.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
So is your birthday Dec 7th or July 12th?
Rembmer, this is an international audience and your code would fail if the day of the month was greater than 12.
@John ... Yikes ... good point. I can't remember everything I did in this video (and I hate watching myself!!!) but depending on how I went about this, I would hope that my phone's location settings would iron this out magically for me. I may need to revisit this if I get a lot of negative feedback on it. Sorry about that!
HEY is something wrong with the WMV HQ FILE?! :|
sorry i had encountered a bug with my media player. :D
Some great methods there to use. I'm surprised by the vast amount of methods on offer and what they do, I can have fun with the date and time one but hoping it is intelligent enough to recognise if im using a date first rather than a month.
Cheers Bob.
@BobTabor. Loving the tutorial, thanks for the clear, descriptive videos.On the point about whether the phone's regional settings would sort out DateTime.Parse if it was entered dd/mm/yyyy instead of mm/dd/yyyy - you are right that the phone will do this. If anyone wants to try it you can do this in the Settings screen under Region and Language in the emulator. If you scroll down there is a System Locale setting. Just remember to hit the 'Tap here to save your changes' if you do change the option (for example I used United Kingdom). The emulator will restart, and save your settings - so just go back and revert if you want to change back.
thanks Bob
Hi Guys!
I'm wondering why my IDE not adds () to methods, if i choose them from auto completion.
For example:
I type myDateValue.
now i choose ToString from the auto-completion and it just adds "ToString" but not "ToString()" how I expected.
Its not really a big Problem but u know, developers are lazy ^^
Is there an option in VS to change that behavior?
Regards & Thanks
Remove this comment
Remove this thread
close