Try this.
<cfset theFile =
createObject("java","java.io.File").init("d:\path\to\myfile.ext")/>
<cfset lastModDate =
createObject("java","java.util.Date").init(theFile.lastModified())/>
Then you can dateformat and timeformat lastModDate
#dateformat(lastModifiedDate, 'mm\dd\yyyy')# #timeformat(lastModifiedDate,
'hh:mm tt')#
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-----Original Message-----
From: Richard Ashley [mailto:[EMAIL PROTECTED]
Sent: Monday, December 18, 2006 4:47 PM
To: CF-Talk
Subject: java.io.File lastModifed() string conver sion
I'm using the java class java.io.File to read the contents of a file,
specifically the lastModified. The lastModified method is returning a number
and I am not sure how to convert the number. I have poked around on the net
but haven't found an answer.
Any ideas on how to convert 1.16420452619E+012 into 11/22/2006 9:08:46AM.
This is on a windows server, IIS6.
Thanks in advance!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264402
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4