Results 1 to 3 of 3
  1.    #1  
    i'm looking for a way to get the timestamp into a variable. i found this at palm:

    Code:
    this.controller.serviceRequest('palm://com.palm.systemservice/time', {
     method:"getSystemTime",
     parameters:{},
     onSuccess: myCallback,
     onFailure: myFailureCallback
     }
    );
    there is an "attribute" for localtime which gives the following:

    year:month:day:hour:minute:second

    i'm just not sure how to put them together so, say, when a button is pressed i can collect the time it was pressed. any ideas?

    thanks!
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix
  2. #2  
    I just use:

    var currentTime = new Date().getTime();


    This gives me the number of milliseconds since 1/1/1970.
  3.    #3  
    Quote Originally Posted by samkim View Post
    I just use:

    var currentTime = new Date().getTime();


    This gives me the number of milliseconds since 1/1/1970.
    thanks! i found some javascript instead of mojo that i'll use (i think it's similar to what you have...):

    Code:
    var currentTime = new Date();
    var month = currentTime.getMonth()+1;
    if(month<10) month = "0"+month;
    var day = currentTime.getDate();
    if(day<10) day = "0"+day;
    var year = currentTime.getFullYear();
    var minute = currentTime.getMinutes();
    var hour = currentTime.getHours();
    var second = currentTime.getSeconds();
    i needed the year, month, day, hour, minute and second.

    thanks again!
    My site: Shanerooni, LLC
    Follow me on Twitter
    My apps: GuessWhat? | MazeHunter3D | Small Wonders | PhakePhoney | AutismAware | PicSketcher | Cubix | QuickSolve | QuickSpell | QuickTrace | QuickWhack | QuickSuite | Soccer Shots | Ballooning |
    Cubix

Posting Permissions