I just created sample BB app, which can allow to choose the date.
(我刚刚创建了示例BB应用程序,可以选择日期。)
DateField curDateFld = new DateField("Choose Date: ",
System.currentTimeMillis(), DateField.DATE | DateField.FIELD_LEFT);
After choosing the date, I need to convert that long value to String, so that I can easily store the date value somewhere in database.
(选择日期后,我需要将该long值转换为String,以便我可以轻松地将日期值存储在数据库中的某个位置。)
I am new to Java and Blackberry development. (我是Java和Blackberry开发的新手。)
long date = curDateFld.getDate();
How should I convert this long value to String?
(我应该如何将这个长值转换为String?)
Also I want to convert back to long from String. (另外我想从String转换回long。)
I think for that I can use long l = Long.parseLong("myStr");
(我想我可以使用long l = Long.parseLong("myStr");
)
? (?)
ask by user225714 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…