below coding is used for print date currennt date and time from your pc

import java.text.SimpleDateFormat;
import java.util.Date;
public class dateformate {

	public static void main (String args[])
	{

	
      Date date = new Date();
      System.out.println("today date    "+date);


}
}

how to get server date by java coding

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.