Forum Replies Created

Viewing 15 posts - 61 through 75 (of 75 total)

  • RE: Current month to yesterday's date

    yep its a complete nightmare, i'm hoping once the report is live and scheduled they will see the benefit from it and grant me access so i can then set...

  • RE: Current month to yesterday's date

    great spot thankyou Thom, it should be IF GETDATE() >='2018-01-02' AND GETDATE() <'2018-01-03'

  • RE: Current month to yesterday's date

    Thank you all, i believe i have sorted this now (code below).  Thanks for everyone's input i have learnt a lot and this will seriously speed up my reporting. 

  • RE: Current month to yesterday's date

    Hi, Yes UK has more hols. I will add in once i have fixed the other issue with data looking for previous day SET @ed = DATEADD(MONTH, 1, @sd);

  • RE: Current month to yesterday's date

    Thanks all, i think the best way around it as i don't have access to any other database is something like the following.  I know its not the ideal way...

  • RE: Current month to yesterday's date

    Thank Thom, already had that chat with the manager but its a no go unfortunately as we don't own the database its a third party and they have only given...

  • RE: Current month to yesterday's date

    I've actually just found some code that may help.  This works perfectly if today's date is the first of the month. So if today's date is the first of the...

  • RE: Current month to yesterday's date

    Thank you so much everyone for this.  I have another issue now being that i do not have access to create tables in the database and the developers will not...

  • RE: Current month to yesterday's date

    Hi,

    So sorry.  ok, so the query pulls back data based on the current month to yesterdays date (which is great but sometimes this is not what i need). ...

  • RE: Current month to yesterday's date

    Sorry Thom, I have had a look at the calendar function and it is completely over my head,  As mentioned i am completely new to SQL.  If you could have...

  • RE: Current month to yesterday's date

    ok thanks a lot.  I'll have a blast and see how i get on.  New to SQL so will probably come back for more help.  Thanks again.  Craig

  • RE: Current month to yesterday's date

    Hi Thom A,

    Thanks for coming back to me.  You are correctly yesterday would have provided me with all of September which is correct but because Sunday is a...

  • RE: Start of month last year

    Thank you all for the support all sorted.  Appreciate it

  • RE: Start of month last year

    Thanks for that, i have amended to the below buts its not bring back the correct data.  Any ideas?

    where DBO.LogFile.Created >= DATEADD(YEAR, -1, DATEADD(MONTH, DATEDIFF(MONTH, 0, @mydate), 0))

  • RE: Start of month last year

    sorry for the confusion, so what i was looking for would be the 01/09/2016 to 26/09/2016.  Hope that makes sense.

    how would i amend the below? sorry new to...

Viewing 15 posts - 61 through 75 (of 75 total)