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

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
jeisen
Posts: 12
Joined: Sat 14 Feb 2015 20:15

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

Post by jeisen » Mon 16 Jan 2017 21:10

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

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

Post by ViktorV » Tue 17 Jan 2017 11:09

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.

jeisen
Posts: 12
Joined: Sat 14 Feb 2015 20:15

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

Post by jeisen » Tue 17 Jan 2017 22:49

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

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

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

Post by ViktorV » Thu 19 Jan 2017 10:08

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.

Post Reply