C# code Read or get File Creation Datetime

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;
}

0 comments: