Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
でmySQLタイムスタンプ形式を取得するにはmySQLtimestamp?
mySQLtimestamp
long epochNow = System.currentTimeMillis()/1000; long epochWeek = 604800; long date7daysAgo = epochNo2013 w - epochWeek; String mySQLtimestamp = /* 2013-09-23:50:00 */
Dateずっと法線を使用しないのはなぜですか?
Date
Calendar cal = Calendar.getInstance(); cal.add(Calendar.DAY_OF_MONTH, -7); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String output = formatter.format(cal.getTime());