---
title: "java 获取当前系统时间、格式化"
author: "li4haoo"
date: "2013-06-03T14:44:30Z"
tags: []
categories: ["编程语言"]
slug: "java"
draft: false
lastmod: "2013-06-03T14:44:30Z"
id: 1881559
url: "https://lee4.iteye.com/blog/1881559"
---

//java 获取当前系统时间、格式化

Date nowtime = new Date();

SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

String printNowTime= sdf.format(slj);