2

Trying to calculate date-time based on Timestamp in dBase 7 file. According to header information given in below link I tried to get 4 bytes of date and tried to convert it to date but it always throws out of range exception. I tried to use DBF viewer application and it shows the correct date. Does anyone know about C# code to read Timestamp from dBase 7 file?

http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm

Mehul Gohel
  • 118
  • 7
  • Your Link to the DBF 7 file format tells me that timestamp fields are 8 byte – nabuchodonossor Apr 06 '18 at 08:49
  • Its 8 bytes - two longs, first for a date, second for time. – Mehul Gohel Apr 06 '18 at 12:21
  • You will have to subtract the number of days between 1/1/4713 BCE and the 31st dec. 1899. This number should be someware around 2415000 days (about 6613 * 365, please consider the leap years). if you subtract this value, you should have the days since 1st january 1900. – nabuchodonossor Apr 09 '18 at 06:17
  • Look at my answer in https://stackoverflow.com/q/46909351/470717 I hope it helps you. – gam6itko Feb 26 '20 at 23:41

0 Answers0