Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Convert Clarion Date to DBISAM date
Fri, Jun 1 2012 1:30 AMPermanent Link

Alex Vastich

Hi,

I am reading data via a Clarion database and I need to convert dates.  Clarion returns an integer which is based on the days since 28th December 1800.  I get this number into a DBISAM memory table For the life of me I cannot convert this into a DBISAM date using SQL.  I thought you could pass a number using cast statement like CAST(numeric as DATE) however it just returns a blank result so I guess this is not possible.

Any ideas?   
Fri, Jun 1 2012 2:46 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Alex


You can cheat a bit and use date arithmetic. Since you know the start point for Clarion something like

CAST('1800-12-28)+Clarion Integer

should work.


Roy Lambert [Team Elevate]
Sun, Jun 3 2012 8:24 PMPermanent Link

Alex Vastich

Ah great thinking Einstein.  Great work.  Thanks heaps.
Image