PDA

Click to See Complete Forum and Search --> : [RESOLVED] Change the system date format.


eranga262154
Jun 10th, 2007, 10:30 PM
One of my Java applications I want to get the system date and time. Say I’m going to use the following class to do that.

import java.util.*;


public class Get_System_Time
{
public static void main(String[] arguments)
{
Date cDate = new Date();

// Current date
System.out.println(cDate);
}
}

Output is,

Wed May 30 08:27:37 LKT 2007

Actually I’m worried about only the date (Wed May 30). But I want to change it little, print the full date, like Wednesday May 30. How can I do that?

ComputerJy
Jun 10th, 2007, 11:11 PM
Take a look at the Calendar (http://java.sun.com/javase/6/docs/api/java/util/Calendar.html) class. I think it has what you are looking for

eranga262154
Jun 10th, 2007, 11:17 PM
Exactly that what I want. Thanks. Lot to read. I check it out and if any issue, come back here.