{{fbdoc item="title" value="FILEDATETIME"}}----
Returns the last modified date and time of a file as [[ProPgDates|Date Serial]] 

{{fbdoc item="syntax"}}##
	[[KeyPgDeclare|declare]] [[KeyPgFunction|function]] **""FileDateTime""** ( [[KeyPgByval|byval]] //filename// [[KeyPgAs|as]] [[KeyPgZstring|zstring]] [[KeyPgPtr|ptr]] ) [[KeyPgAs|as]] [[KeyPgDouble|double]]
##
{{fbdoc item="usage"}}##
	#include "file.bi"
	//result// = **""FileDateTime""**( //filename// )
##
//or//
##
	#include "vbcompat.bi"
	//result// = **""FileDateTime""**( //filename// )
##
{{fbdoc item="param"}}
	##//filename//##
		Filename to retrieve date and time for.

{{fbdoc item="ret"}}
	Returns a [[ProPgDates|Date Serial]].

{{fbdoc item="desc"}}
	Returns the file's last modified date and time as [[ProPgDates|Date Serial]].

{{fbdoc item="ex"}}
{{fbdoc item="filename" value="examples/manual/system/filedatetime.bas"}}%%(freebasic)
#include "vbcompat.bi"

dim filename as string, d as double

print "Enter a filename: "
line input filename

if fileexists( filename ) then

  print "File last modified: ";

  d = Filedatetime( filename )

  print Format( d, "yyyy-mm-dd hh:mm AM/PM" )

else

  print "File not found"

end if
%%

{{fbdoc item="target"}}
	- Linux requires the ##//filename//## case matches the real name of the file. Windows and DOS are case insensitive. 
	- Path separators in Linux are forward slashes ##/## . Windows uses backward slashes ##\## but it allows forward slashes.  DOS uses backward slashes ##\##.


{{fbdoc item="diff"}}
	- New to ""FreeBASIC""

{{fbdoc item="see"}}
	- [[ProPgDates|Date Serials]]

{{fbdoc item="back" value="CatPgOpsys|Operating System Functions"}}