Solved

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

Posted on 2006-11-15
2
512 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
Comment Utility
System.out.println(new Date(longValue));
0
 
LVL 86

Expert Comment

by:CEHJ
Comment Utility
:-)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now