display date from file

i am trying to get the date of a file to display in a text field when the window is opened.


on awake from nib theObject
	tell window of theObject
	set contents of text field "last_run" to date of file "path:to:file"
	end tell
end awake from nib

TIA, jim

Wich date you want ?
Creation date or modification date ?

on awake from nib theObject 
   tell window of theObject 
   set contents of text field "last_run" to ¬
   	(modification date of (info for ("path:to:file" as alias))) as string
   end tell 
end awake from nib 

:wink:

Thank you.

Ok… i dont know very welle ASStudio, but, you can try this:

on awake from nib theObject  
    tell window of theObject  
    set contents of text field "last_run" to ¬ 
       modification date of (info for ("path:to:file" as alias)))
    end tell  
 end awake from nib

:wink: