Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
file time stamp
tomo black
Greenhorn
Posts: 11
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi, this might seem like a silly question but how do i get the time stamp for a particular file?
thanks
Aneesha Singh
Ranch Hand
Posts: 47
posted 20 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Check out java.io.File. There is a method called lastModified() which returns the time in milliseconds. You can then use java.util.Date or java.util.Calendar, to get the relevant date(eg, maybe new Date(long millis)) .
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Unix time stamp
How to create a Log File...... plz help me
log4j - time stamp as file name
Shell Script For Getting List Of File name In A directory
How to Read the Time Stamp of a File
More...