DateTime Field only Returns Date in Dynamic NAV

niimodinniimodin Member Posts: 142
Hello Experts,
I have a Table:
CREATE TABLE [dbo].[CHECKINOUT](
[USERID] [int] NOT NULL,
[CHECKTIME] [datetime] NOT NULL,
[CHECKTYPE] [varchar](1) NULL,
[VERIFYCODE] [int] NULL,
..................

I have the following query in a codeunit in NAV


SQLString := 'SELECT c.CHECKTIME, '+
'c.VERIFYCODE, CAST(c.SENSORID AS INT) AS ReaderID,'+
'(SELECT CAST(u.BADGENUMBER AS INT) FROM [ZKSoftware].[dbo].[USERINFO] u WHERE u.USERID = c.USERID ) AS BioID '+
'FROM [ZKSoftware].[dbo].[CHECKINOUT] c';


But the message below on return a date value

............................
MESSAGE('%1',ADORecSet.Fields.Item('CHECKTIME').Value);

.............................................

but the same query in MS SQL Managment Studio return a datetime

Pls can someone point out to me what I am missing?

Thanks

Comments

Sign In or Register to comment.