Switch to full style
General Java code examples
Post a reply

current system time

Tue Mar 23, 2010 10:36 pm

Following code snippet use to get current system time using TIMESTAMP class .


Code:

import java
.sql.Timestamp;
 
public class 
demo {

    
/**
     * @param args
     */
    
public static void main(String[] args) {
 
         
System.out.println("Date = "+new Timestamp(System
                 
.currentTimeMillis()));
    }

}

 




Post a reply
  Related Posts  to : current system time
 How to get system time in java     -  
 Number format for current     -  
 get current page link     -  
 Printing today+ current date with different format     -  
 Want start and end date of a month from current date     -  
 What Time Is It?     -  
 explode time     -  
 max execution time     -  
 Time countdown     -  
 run time polymorphism     -  

Topic Tags

Java Time