0

My code-

SELECT dbo.NumericSamplesDelByTapan.TagID, dbo.Tags.TagName, dbo.Tags.Location
,(SELECT  DATEADD(Millisecond, FLOOR((dbo.NumericSamplesDelByTapan.SampleDateTime - 599266080000000000) % (10000000 * 60) / 10000)
, DATEADD(Minute, FLOOR((dbo.NumericSamplesDelByTapan.SampleDateTime - 599266080000000000) / (10000000 * 60) + 330), '01-01-1900')) AS EXPR1) AS TimeStamp
, dbo.NumericSamplesDelByTapan.SampleValue

FROM  dbo.Tags 
INNER JOIN dbo.NumericSamplesDelByTapan 
  ON dbo.Tags.ID = dbo.NumericSamplesDelByTapan.TagID
Chetan
  • 6,711
  • 3
  • 22
  • 32
  • 1
    tag RDBMS correctly. MySQL,SQL Server,postgresql,..... – RF1991 Apr 13 '22 at 08:45
  • 1
    What is the type of `dbo.NumericSamplesDelByTapan.SampleDateTime`? Why all these calculation? What are you trying to achieve in this Query? What exactly is the error message you are getting? Can you share some sample values from `dbo.NumericSamplesDelByTapan.SampleDateTime` ? – Chetan Apr 13 '22 at 08:50

0 Answers0