Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to convert Java.util.Date.time() to CCYYMMDD?

Posted on 2006-11-15
2
541 Views
Last Modified: 2012-08-14
Dear Experts,

I'm getting File.lastmodified(), and it's returning a long number, which I assume is actually Java.util.Date.time().  

First, is that right?  

Second, how do I convert that to CCYYMMDD? (I don't care about the time)

Thanks!
BrianMc1958
0
Comment
Question by:BrianMc1958
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 17948838
System.out.println(new Date(longValue));
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 17948897
:-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 116
tomcat administrtor 12 61
by zero exception 10 52
Facing this issue for maven proxy setting 2 20
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question