Gerrit Mantel
Programs SQL_SCALAR_FUNCTION - fun_FolderProperty_DateLastModified

Main program

Namefun_FolderProperty_DateLastModified
Type_descSQL_SCALAR_FUNCTION
CommentSQLServer User-Defined Function

PURPOSE
Return the date last modified of a given directory name.

If the dateformat (sShortDate) in the users's registry is not known,
or has an unknown format, the default english dateformat M/d/yyyy
is used to convert the date string. SQL Server can throw an error on this.

Return value (DATETIME):
NULL - Directory does not exist
datetime - Lastmodified date of the folder

EXAMPLES
SELECT dbo.fun_FolderProperty_DateLastModified ('C:\Users')
2014-10-25 15:04:13.000

SELECT dbo.fun_FolderProperty_DateLastModified ('C:\does not exist')
NULL

HISTORY
2000-01-01 - Created function
2015-11-17 - The sShortDate registry value is now used to convert date string
2024-02-09 - Changed history table

TAGS
<program>
<description>Return the date last modified of a given directory name</description>
<generic>1</generic>
<author>Gerrit Mantel</author>
<created>2000-01-01</created>
<lastmodified>2024-02-09</lastmodified>
</program>
DescriptionReturn the date last modified of a given directory name
Minversion
Generic1
AuthorGerrit Mantel
Created2000-01-01 00:00:00
Lastmodified2024-02-09 00:00:00
Xp_cmdshell0
Ole_automation1
Subprogram_cnt0
Sourcecode