TImestamp with milliseconds or ten thousandths of a second
Posted: Thu 01 Sep 2016 23:21
I am using PostgreSQL and dotConnect for PostgreSQL to develop an application in .NET where I use a timestamp field. Actually, I am inserting records with the format ToString("yyyy/MM/dd HH:mm:ss"). Is it possible to specify milliseconds or ten thousandths of a second?
According to Microsoft documentation (https://msdn.microsoft.com/en-us/librar ... .110).aspx) I am trying ToString("yyyy/MM/dd HH:mm:ss.fff") for milliseconds and ToString("yyyy/MM/dd HH:mm:ss.ffff") for ten thousandths of a second but I get an error saying that syntax is not valid. However, the format ToString("yyyy/MM/dd HH:mm:ss") works pefectly well.
Regards.
According to Microsoft documentation (https://msdn.microsoft.com/en-us/librar ... .110).aspx) I am trying ToString("yyyy/MM/dd HH:mm:ss.fff") for milliseconds and ToString("yyyy/MM/dd HH:mm:ss.ffff") for ten thousandths of a second but I get an error saying that syntax is not valid. However, the format ToString("yyyy/MM/dd HH:mm:ss") works pefectly well.
Regards.