Link to home
Start Free TrialLog in
Avatar of pgmtkl
pgmtkl

asked on

ssrs query

I am new to using SSRS reporting, iw as using report builder. I was wondering how to convert the below report builder filter experessions to use in SSRS. I have looks and see there is this in SSRS but not sure how it is set up. CONVERT(BIGINT, DATEDIFF(S, '19700101', '20380119')) + CONVERT(BIGINT, DATEDIFF(S, '20380119', CONVERT(CHAR(10), GETUTCDATE() - 5, 101) + '  12:00:00')) .
The below filter example i need to convert are:
Friday 18:00 to Monday 18:00:
AND(aTime  >= DATEDIFF(SECOND, #1/1/1970#, DATEADD(SECOND, 86400, TODAY())), aTime  < DATEDIFF(SECOND, #1/1/1970#, DATEADD(SECOND, 86400, (DATEADD(DAY, 3, TODAY())))))

end time in last 30 days:
eTime  >= DATEDIFF(SECOND, #1/1/1970#, DATEADD(DAY, -30, TODAY()))

any help is appreciated, also if you have a link to something that explains how to get the filter/qyert to work.
Avatar of Mark Wills
Mark Wills
Flag of Australia image

What are "atime" and "etime" - they seem to be unix time stamps ?

How are you accessing the data at the moment ? Do you have a report able to print some data (regardless of filter), if so what is your datasource ?

So in SSRS what you need is PARAMETERS for the date so you can then use them to convert into seconds, or, have your query conert etime and atime into a date construct using date adds etc.

Can you show some sample data ?
Avatar of pgmtkl
pgmtkl

ASKER

they are unix time stamps. in report builder i would do (dateadd(day,-30,today). i access it through a sanpshot of data from the other server. do i need to use the datediff functon with dateadd?
ASKER CERTIFIED SOLUTION
Avatar of Mark Wills
Mark Wills
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pgmtkl

ASKER

Thanks so much, i was getting stuck on this since i am new to it.
Happy to help, and sorry about lossing the initial impetus on this thread. Thanks to CoolleoMod for sending out the reminder.