Page 1 of 1

FileInfo.Attributes.CreateTime to display as mm/dd/yyyy

Posted: Mon 16 Jan 2017 21:10
by jeisen
I'm sure I'm missing something easy but no matter what I try, the date is returned as 12/30/1899 The documentation says the "time is presented in the UTC time scale" but I can't seem to find anyway to convert the createtime attribute to display the correct date the file was created.

I appreciate any assistance

Re: FileInfo.Attributes.CreateTime to display as mm/dd/yyyy

Posted: Tue 17 Jan 2017 11:09
by ViktorV
To obtain the CreateTime value SFTP protocol version should be 4 or higher, as the minor SFTP versions do not return the CreateTime value.
Therefore, to solve the problem, please try to set the TScSFTPClient.Version property value to vSFTP4 or higher.

Re: FileInfo.Attributes.CreateTime to display as mm/dd/yyyy

Posted: Tue 17 Jan 2017 22:49
by jeisen
I set the version but the date still comes back as 12/30/1899. Should I be using a Unix date conversion or some other date conversion? thanks

Re: FileInfo.Attributes.CreateTime to display as mm/dd/yyyy

Posted: Thu 19 Jan 2017 10:08
by ViktorV
It is possible that your SFTP server does not return the CreateTime value. Please check if you can obtain the CreateTime value when connecting to SFTP server with another program.