- BlackBerry Support Community Forums
- Welcome & Introductions
- Announcements
- Your Stories
- Smartphones
- BlackBerry® Bold™ 9700 smartphone
- BlackBerry® Tour™ 9630
- BlackBerry Storm - BlackBerry 9500 Series Smartphone
- BlackBerry Bold - BlackBerry 9000 Series Smartphone -
- BlackBerry Curve - BlackBerry 8900 Series Smartphone
- BlackBerry 8800 Series Smartphone
- BlackBerry Curve 8500 Series Smartphone
- BlackBerry Curve - BlackBerry 8300 Series Smartphone
- BlackBerry Pearl - BlackBerry 8200 Series Smartphone
- BlackBerry Pearl- BlackBerry 8100 Series Smartphone -
- Other BlackBerry Smartphones and Devices
- General BlackBerry Smartphone Functions and Features
- BlackBerry Accessories
- Software
- BlackBerry® Desktop Software
- BlackBerry® for Mac
- BlackBerry® Device Software
- BlackBerry® Applications, Third-Party Applications & BlackBerry App World
- BlackBerry App World - General Discussions
- Downloaded Applications for BlackBerry Devices
- Solutions
- BlackBerry® Enterprise Server Version 5.0
- BlackBerry® Enterprise Solution
- BlackBerry® Internet Service
- BlackBerry® Professional Software and BlackBerry® Unite!
- BlackBerry® Training and Certification
- BlackBerry® Training and Certification
- BCP-410
- BlackBerry Development
- Dev Blog
- BlackBerry App World™ Development
- Java Development
- Web Development
- MDS Runtime Development
- BlackBerry Enterprise Server Development
- Product Management: The BlackBerry Application Platform
- BlackBerry Themes & Animated Graphics
- Community Forums Feedback
- Forum Feedback and Ideas
- BlackBerry Community Post
- BlackBerry Community Post
- Register
- ·
- Sign In
- ·
- Help
- ·
- New Topics
- ·
- New Posts
- BlackBerry Support Community Forums
- :
- BlackBerry Development
- :
- Java Development
- :
- Re: Dates of next 14 days
- Subscribe to RSS Feed
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Dates of next 14 days
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-07-2009 02:15 AM
Hello,
In my App. i need to display next 14 days Dates from current day.
How can i get next 14 dates?
i am able to get current date.
Thanks in advance.
Solved! Go to Solution.
Re: Dates of next 14 days
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-07-2009 02:26 AM
You can convert the current date time to milliseconds and vice versa. Add how many milliseconds there are in a day and convert back to a date, fourteen times.
Re: Dates of next 14 days
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-07-2009 02:30 AM
Bingo !!
i just now tried the same thing and its working fine.
1 day = 86400000 millis
long currentTime = System.currentTimeMillis(); currentTime += 86400000; // for 14 times
Re: Dates of next 14 days
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-08-2009 08:48 PM
Be aware that this approach may not work around DST change time, because days can be shorter or longer than 24 hours.
I prefer to use the DateTimeUtilities.ONE_DAY type constants when incrementing/decrementing the time.
Re: Dates of next 14 days
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Flag for a Moderator
11-08-2009 10:16 PM
Ohh
I should take care of it. I will work around and will be back if any queries or solutions.
Thanks peter_strange
Shortcut Navigation
Copyright © 2009 Research In Motion Limited, unless otherwise noted.






