BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 12-22-2009, 09:04 AM   #1
shreeram
New Member
 
Join Date: Dec 2009
Model: 8130
PIN: N/A
Carrier: just start..........
Posts: 12
Question how to get time & date?

Please Login to Remove!

Hi,


i want to find out the time & date for video file saved in bb on SDcard.

i can open using
(FileConnection)Connector.open(file_name);
i get the size using
fcsize();

but how to get time & date..........???

Thanks in advance..............
Offline  
Old 12-22-2009, 09:12 AM   #2
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

How about FileConnection.lastModified() ?

long dtm = fc.lastModified()

Date dt = new Date(dtm)
Offline  
Old 12-22-2009, 10:52 AM   #3
dealchecker290
New Member
 
Join Date: Dec 2009
Model: 9500
PIN: N/A
Carrier: chrome
Posts: 3
Default

buddy you can check it from file manager.
__________________
holidays to orlando
Offline  
Old 12-22-2009, 11:06 AM   #4
shreeram
New Member
 
Join Date: Dec 2009
Model: 8130
PIN: N/A
Carrier: just start..........
Posts: 12
Default

Hi Dougsg38p
thanks 4 reply but it throws exception.....


can u give me the othr way
or any example if u have will be more useful..........


thanks..
Offline  
Old 12-22-2009, 11:07 AM   #5
shreeram
New Member
 
Join Date: Dec 2009
Model: 8130
PIN: N/A
Carrier: just start..........
Posts: 12
Default

Hi dealchecker290

can u tell me how to do that?

i don't know..?

might be its a basic, but sorry i don't know

plz tell me if u know..........
Offline  
Old 12-22-2009, 12:30 PM   #6
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

OK - you *do* understand that this is just a code snippet and not real working code, right? Did you look at the API docs for FileConnection?

Do you also know that your other thread (in BB dev forum) is also answered, same answer (not by me)?

"throws exception" is extremely unhelpful.

What exception is thrown, at what line? Please post your code.

Last edited by Dougsg38p; 12-22-2009 at 12:32 PM..
Offline  
Old 12-22-2009, 12:33 PM   #7
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

Note to dealchecker290: this is the Java dev forum, and the question is related the Java API's, so your answer (although appreciated!) is not relevant to the question.
Offline  
Old 12-23-2009, 02:18 AM   #8
shreeram
New Member
 
Join Date: Dec 2009
Model: 8130
PIN: N/A
Carrier: just start..........
Posts: 12
Default

FileConnection fc =
(FileConnection)Connector.open("file:///SDCard/BlackBerry/Videos/");

System.out.println("Video File Connection Store Open..........");

Now on SD card there are Video Files like

VID01
VID02
VID03

This details are from property of that video(manual look..........)
VID01 is of 10dec09

VID02 is of 15dec09

VID03 is of 20dec09

Now last date & time is for VID03 which i want to access thr' my application.......

How to do that???????????????

Hope u can help me!!!!!!!!!!!!!!!!!

Last edited by shreeram; 12-23-2009 at 02:20 AM..
Offline  
Old 12-23-2009, 08:19 AM   #9
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Default

fc.lastModified() returns the date/time as a long value. You pass this value to the Date class to create a Date object.

What part of this does not work?
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Phoenix Contact Voltage Distribution Block Part No. 2315269 picture

Phoenix Contact Voltage Distribution Block Part No. 2315269

$30.00



AVR EA16 Automatic Voltage Regulator Compatible With KUTAI Generator GENSET picture

AVR EA16 Automatic Voltage Regulator Compatible With KUTAI Generator GENSET

$99.90



BYSTRONIC VOLTAGE MODULE VM 50A 300V POWER SUPPLY 700024 picture

BYSTRONIC VOLTAGE MODULE VM 50A 300V POWER SUPPLY 700024

$2499.95



GEYA Over Under Voltage Monitoring Relay AC/DC110-240V Voltage Protection Device picture

GEYA Over Under Voltage Monitoring Relay AC/DC110-240V Voltage Protection Device

$16.99



Renogy 500A Battery Monitor High and Low Voltage Programmable Alarm 500A Shunt picture

Renogy 500A Battery Monitor High and Low Voltage Programmable Alarm 500A Shunt

$70.99



USB Type-C Meter Tester Digital Multimeter Current Voltage Power Detector +Cable picture

USB Type-C Meter Tester Digital Multimeter Current Voltage Power Detector +Cable

$19.98







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.