Click here to Skip to main content
14,920,935 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi guys, I have some problem with J2ME, the problem is,

When using simulator in netbeans, saving date field to database is successfull, but when I instal it in my phone(nokia E-63) the date that saved into database not the 1 that I inputed in the date field, here my code part for date field

Java
private DateField currentDate= new DateField("Date :", DateField.DATE);
private Date now = new Date();
currentDate.setDate(now);
myform.append(currentDate);


btw the device properties I'm using in netbeans is:
Device prifile :MIDP-2.0
Device Configuration : CLDC-1.1
Posted

1 solution

Try setting the timezone
Java
private DateField currentDate= new DateField("Date :", DateField.DATE, TimeZone.getTimeZone(name of your timezone));

Peter
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900