package test; import java.text.SimpleDateFormat; import java.util.Date; import java.util.MissingFormatArgumentException; public class NowTime { public static void main(String[] args) { Date nowDate=new Date(); SimpleDateFormat sdf=new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); String str=sdf.format(nowDate); System.out.println(str); } }
时间: 2024-11-12 14:59:01