c# code : get created date time type metadata for a given filepath

///
/// Reads created date time type metadata for a given filepath
///

///
/// createdDatetime of the file
private string ReadCreationDateMetadata(string filepath)
{
string Filepath = filepath;
string FileName = Path.GetFileName(Filepath);
DateTime CreatedDateTime = File.GetCreationTime(Filepath);
string createdDatetime = string.Format("{0:R}", CreatedDateTime);
return createdDatetime;
}

Please write your comments

No comments:

Post a Comment