T-SQL query output


I would like to get a information for the date 01/18/2018 created UTC column.

Alert me
Vote as helpful

I have a table name BtPrintJobs

I have tried the following way,

select top 3 * from BtPrintJobs



i ran this following query to get last utc

select MIN(CreatedUTC) from BtPrintJobs

Declare @TickValue bigint
Declare @Days float

Set @TickValue = 635283186097710000
Select @Days = @TickValue * POWER(10.00000000000,-7) / 60 / 60 / 24

Select DATEADD(d, Cast(@Days As int), Cast('0001-01-01' As DATE))
    + Cast( (@Days - FLOOR(@Days)) As DateTime)

where i get the date information 2013-11-07
Zahid AhamedDatabase AdministratorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Nitin SontakkeDeveloperCommented:
And your question is.....?
Nitin SontakkeDeveloperCommented:
According to this web-site, your answer seem to be incorrect:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Zahid AhamedDatabase AdministratorAuthor Commented:
User is requesting me to get the data for this 01/18/2018, the table has column which is created UTC, i am not able to convert. Please help
Nitin SontakkeDeveloperCommented:
The reverse process calculation is also given at the following location.


Use it to arrive at the ticks value (let say @jan18) and then just say

select * 
from BtPrintJobs
where CreatedUTC > @jan18

Open in new window

Zahid AhamedDatabase AdministratorAuthor Commented:
thanks for your help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.