Click here to Skip to main content
16,005,467 members
Home / Discussions / Java
   

Java

 
GeneralRe: Substring issue Pin
CodeScribbler17-Jun-10 2:43
CodeScribbler17-Jun-10 2:43 
QuestionEmulating a serial communication through RFCOMM Pin
ant-damage14-Jun-10 10:36
ant-damage14-Jun-10 10:36 
QuestionNokia 2323 DateTime Issue??? Pin
Member 211994514-Jun-10 2:56
Member 211994514-Jun-10 2:56 
AnswerRe: Nokia 2323 DateTime Issue??? Pin
Richard MacCutchan14-Jun-10 4:39
mveRichard MacCutchan14-Jun-10 4:39 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
Member 211994514-Jun-10 14:22
Member 211994514-Jun-10 14:22 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
David Skelly14-Jun-10 22:48
David Skelly14-Jun-10 22:48 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
Member 211994515-Jun-10 1:51
Member 211994515-Jun-10 1:51 
GeneralRe: Nokia 2323 DateTime Issue??? [modified] Pin
Richard MacCutchan15-Jun-10 3:54
mveRichard MacCutchan15-Jun-10 3:54 
Most of your code is not needed, try this:
private String getTimestamp() {
    try {
        // get the calendar instance for current time    
        Calendar ca = Calendar.getInstance();
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
        String stime = df.format(ca.getTime());
        System.out.printf("%s\n", stime);   // DEBUG
    } catch (Exception e) {
        // nothing
    }
    return stime;
}


[edit]As David Skelly points out below, SimpleDateFormat is not available on the 2323, but there may still be a somewhat less complex method you can work on. I'm reasonably sure you do not need to use the System.currentTimeMillis() function after obtaining the Calendar object.[/edit]
It's time for a new signature.
modified on Tuesday, June 15, 2010 1:00 PM

GeneralRe: Nokia 2323 DateTime Issue??? Pin
David Skelly15-Jun-10 4:24
David Skelly15-Jun-10 4:24 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
Richard MacCutchan15-Jun-10 5:01
mveRichard MacCutchan15-Jun-10 5:01 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
David Skelly15-Jun-10 6:40
David Skelly15-Jun-10 6:40 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
Richard MacCutchan15-Jun-10 6:59
mveRichard MacCutchan15-Jun-10 6:59 
GeneralRe: Nokia 2323 DateTime Issue??? Pin
Member 211994515-Jun-10 14:17
Member 211994515-Jun-10 14:17 
QuestionHow can I add Resources with jar file? Pin
002comp13-Jun-10 18:20
002comp13-Jun-10 18:20 
AnswerRe: How can I add Resources with jar file? (Solved) Pin
002comp13-Jun-10 18:50
002comp13-Jun-10 18:50 
QuestionSending of byte array messages to an VB Receiving Emulator application Pin
pohcb_sonic10-Jun-10 18:43
pohcb_sonic10-Jun-10 18:43 
AnswerRe: Sending of byte array messages to an VB Receiving Emulator application Pin
Richard MacCutchan10-Jun-10 23:15
mveRichard MacCutchan10-Jun-10 23:15 
GeneralRe: Sending of byte array messages to an VB Receiving Emulator application [modified] Pin
pohcb_sonic14-Jun-10 14:40
pohcb_sonic14-Jun-10 14:40 
GeneralRe: Sending of byte array messages to an VB Receiving Emulator application Pin
Richard MacCutchan15-Jun-10 4:48
mveRichard MacCutchan15-Jun-10 4:48 
QuestionHow to resizethe backGround Image to JPanel? Pin
002comp9-Jun-10 1:48
002comp9-Jun-10 1:48 
AnswerRe: How to resizethe backGround Image to JPanel? Pin
David Skelly9-Jun-10 5:22
David Skelly9-Jun-10 5:22 
GeneralRe: How to resizethe backGround Image to JPanel? Pin
002comp9-Jun-10 17:52
002comp9-Jun-10 17:52 
GeneralRe: How to resizethe backGround Image to JPanel? Pin
David Skelly9-Jun-10 22:26
David Skelly9-Jun-10 22:26 
GeneralRe: How to resizethe backGround Image to JPanel? Pin
002comp10-Jun-10 1:05
002comp10-Jun-10 1:05 
QuestionDrop Down Pin
Wcmedic8-Jun-10 11:39
Wcmedic8-Jun-10 11:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.