Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
ASHWINDAGA
Posts: 8
Registered: ‎06-06-2010
My Device: curve 8520
My Carrier: vodafone

Get file created date

Hi,

I am looking for a way to get the file created & modified date as shown in the picture below. Have gone through the javax.microedition.io.file and the net.rim.device.api.io.file  packages but one seem to provide any solution. Kindly help!

 



Please use plain text.
Developer
lcaro
Posts: 95
Registered: ‎10-19-2010
My Device: Blackberry 8110
My Carrier: Generic

Re: Get file created date

Try this:

 

FileConnection fc = null;

 

try {

     fc = (FileConnection)Connector.open(file, Connector.READ);

 

     //Date 

     long dtm = fc.lastModified();

     Date dt = new Date(dtm);

     String fecha = dt.toString();

}

Please use plain text.
New Contributor
ASHWINDAGA
Posts: 8
Registered: ‎06-06-2010
My Device: curve 8520
My Carrier: vodafone

Re: Get file created date

I get the lastModified date. not the file created date. any idea about the file created date?

Please use plain text.