You Are Here:

Community: Developer Discussion Boards

#1 Old Error converting Date to string on nokia 6600 - 2008-11-08, 16:01

Join Date: Mar 2003
Posts: 564
cassioli's Avatar
cassioli
Offline
Super Contributor
Why does the same program behave in different ways on 6680 (first screenshot) and 6600 (second?!?)
http://trafficlc.googlecode.com/files/6680.jpg
http://trafficlc.googlecode.com/files/6600.jpg

Source is:
Code:
        Calendar myCalender = Calendar.getInstance (TimeZone.getTimeZone ("UTC"));
        Date d = new Date (myCalender.getTime ().getTime () + (0*60*60*1000));
        LastUpdate = d.toString();
Reply With Quote

#2 Old Re: Error converting Date to string on nokia 6600 - 2008-11-08, 20:36

Join Date: Mar 2003
Posts: 54
Location: Turin, Italy
ilsocio
Offline
Regular Contributor
Hi cassioli,
the Date.ToString() has not been implemented in the 6600 vm...

Take a look at this thread:
http://discussion.forum.nokia.com/fo...ad.php?t=90440

Regards,
Marco.
Reply With Quote

#3 Old Re: Error converting Date to string on nokia 6600 - 2008-11-08, 21:51

Join Date: Mar 2003
Posts: 564
cassioli's Avatar
cassioli
Offline
Super Contributor
Quote:
Originally Posted by ilsocio View Post
Hi cassioli,
the Date.ToString() has not been implemented in the 6600 vm...

Take a look at this thread:
http://discussion.forum.nokia.com/fo...ad.php?t=90440

Regards,
Marco.
Thanks, cool link.

This is my implementation:

Code:
        Calendar myCalender = Calendar.getInstance (TimeZone.getTimeZone ("UTC"));  
        int year = myCalender.get(Calendar.YEAR);
        int month = myCalender.get(Calendar.MONTH)+1;
        int day = myCalender.get(Calendar.DATE);
        int hour = myCalender.get(Calendar.HOUR_OF_DAY);
        int min = myCalender.get(Calendar.DATE);
        LastUpdate = Integer.toString(year)+"/"+
                     Lead0(month)+"/"+
                     Lead0(day)+" "+
                     Lead0(hour)+":"+
                     Lead0(min);        


public String Lead0(int number) {
    if (number<10) return "0"+Integer.toString(number); else return Integer.toString(number);
}
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Python S60 Emulator NAYSAMBO Python 25 2009-04-08 11:22
Infra-red capability Symbian_Challenge_0412 General Discussion 1 2005-08-16 19:24

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia