hi everybody: I am workin in a small application . I want to get the current date in this format "mm\dd\yyyy" can anyone tell me how to do that ? rgds siva
Hi There Siva, try using the abstract Class DateFormat on an instance of a Date Object, U can modify the formats of the Date. check it out.... Bye, Sheldon
By the way I tried out the syntax provided by the ranch hand had an error the actual value would be String mmddyy = ""+(c.get(Calendar.MONTH)+1)+"/"+(c.get(Calendar.DATE))+"/"+(c.get(Calendar.YEAR)); See ya Sheldon
Hi, Deekasha: What more should be done if I want the current date to be a Date type rather than a String type. The reply is appreciated. BQ
note that c.get(Calendar.MONTH) returns (current month -1) so i have added 1 to it. regards deekasha regards deekasha[/qb]<hr></blockquote> [ November 12, 2002: Message edited by: Binqing Liu ]