PURGING DATA

  • HI All,

    I have an assignment, to Purging data, with conditions:
    1. Keep the full data 6 months (keep all the records from 01 May 2017 - now, else 31 October 2017 later)

    2. Over 6 months, Keep only the last day of the record (ex: 30 Apr 2017, 31 March 2017 ,etc)

    I've created Stored Procedure (SP) for it..and perhaps any suggestions to make it better, I welcome you.
    .

    CREATE TABLE [dbo].[parameter](
       [id] [int] NOT NULL,
       [Table_Name] [nvarchar](50) NULL,
    CONSTRAINT [PK_parameter] PRIMARY KEY CLUSTERED
    (
       [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    GO

    INSERT INTO [dbo].[parameter]
        ([id]
        ,[Table_Name])
      VALUES
    ('1','dbo.DB_DATE')

    GO

    --========================================================================================

    declare @maxid int,
    @flag int,
    @SQLSTATE varchar (8000),
    @name varchar (50),
    @a date,@b date,@c date,@d date,@e date,@f date,@g date,@h date,@i date,@j date,@k date,@l date,@m date,@n date,@o date,@p date,@q date,@r date,@s date,@t date,@u date,@v date,@w date,@x date,@y date,@z date,@aa date,@bb date, @cc date

    set @maxid = (select max(id) from dwim.dbo.parameter)
    set @flag = '1'
    set @a = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0))as date)
    set @b-2 = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-2,0))as date)
    set @C = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-3,0))as date)
    set @d = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-4,0))as date)
    set @e = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-5,0))as date)
    set @f = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-6,0))as date)
    set @g = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-7,0))as date)
    set @h = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-8,0))as date)
    set @i = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-9,0))as date)
    set @j-2 = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-10,0))as date)
    set @k = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-11,0))as date)
    set @l = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-12,0))as date)
    set @m = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-13,0))as date)
    set @n = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-14,0))as date)
    set @o = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-15,0))as date)
    set @p = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-16,0))as date)
    set @q = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-17,0))as date)
    set @r = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-18,0))as date)
    set @s-2 = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-19,0))as date)
    set @t = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-20,0))as date)
    set @U = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-21,0))as date)
    set @v-2 = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-22,0))as date)
    set @w = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-23,0))as date)
    set @x = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-24,0))as date)
    set @y = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-25,0))as date)
    set @z = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-26,0))as date)
    set @aa = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-27,0))as date)
    set @bb = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-28,0))as date)
    set @cc = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-29,0))as date)

    while (@flag <= @maxid)
    begin
       set @nama = (select nama_table from dwim.dbo.parameter where id = @flag)

       set @SQLSTATE = 'select 1 while @@ROWCOUNT > 0 BEGIN delete top (5000) from dwim.' +@name+' where datekey < ''' +cast(@d as varchar)+'''
    and datekey not in (''' +cast(@d as varchar)+''',
    ''' +cast(@e as varchar)+''',
    ''' +cast(@f as varchar)+''',
    ''' +cast(@g as varchar)+''',
    ''' +cast(@h as varchar)+''',
    ''' +cast(@i as varchar)+''',
    ''' +cast(@j as varchar)+''',
    ''' +cast(@k as varchar)+''',
    ''' +cast(@l as varchar)+''',
    ''' +cast(@m as varchar)+''',
    ''' +cast(@n as varchar)+''',
    ''' +cast(@o as varchar)+''',
    ''' +cast(@p as varchar)+''',
    ''' +cast(@q as varchar)+''',
    ''' +cast(@r as varchar)+''',
    ''' +cast(@s as varchar)+''',
    ''' +cast(@t as varchar)+''',
    ''' +cast(@u as varchar)+''',
    ''' +cast(@v as varchar)+''',
    ''' +cast(@w as varchar)+''',
    ''' +cast(@x as varchar)+''',
    ''' +cast(@y as varchar)+''',
    ''' +cast(@z as varchar)+''',
    ''' +cast(@aa as varchar)+''',
    ''' +cast(@bb as varchar)+''',
    ''' +cast(@cc as varchar)+'''
    ) END'
    --end
       print @SQLSTATE
       --exec (@SQLSTATE)
       set @flag = @flag + 1
    end
     

    Thank You...

  • Can you provide some small sample data showing what you expect to happen to each row?

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • The way you're going about it will require constant changes to the stored procedure each month.  Further and based on the number of months that you look like you're trying to delete on the initial run, you could be setting yourself up for a logfile and backup explosion.  The problem is that we can't tell with the information provided because it just does appear to match your description of what to delete.

    We need to know the following...
    1.  Is the name of the table you want to delete from actually "dbo.DB_DATE"??? I have my doubt there.  That seems like it would be a Calendar table of sorts so please confirm what the name of the table is that you want to delete from.
    2.  You also have the rule that for rows "Over 6 months" in age, you want to "Keep only the last day of the record (ex: 30 Apr 2017, 31 March 2017 ,etc".  You haven't identified how to identify "the record" to keep and we can't tell because it looks like you're deleting from a Calendar table.  Further, are the multiple accounts (or whatever) per month that you want to keep "the last record" for?

    As a bit of a side bar and depending on the content and purpose of the actual table you're trying to delete from, I thing this whole thing might be a mistake.  You're deleting a hell of a lot of history.  If it's transactional history for customers, you may be in violation of state or other laws.  It may be that instead of deleting data, you should be safely archiving the data.

    Anyway, please provide the info for the two question I asked so we can help you better because the code you provided isn't doing much for us. to help.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff, don't forget to add in LOCKING THE TABLE for potentially an extended period. This almost certainly needs to be batched into some number of rows per batch, using a (essentially) GUARANTEED INDEX SEEK of some flavor, with explicit transactioning to minimize locking/blocking, a waitfor delay to give the server breathing room and a check for tlog size for a possible backup log step too. 

    I have done the above MANY times on tables needing up to nearly a BILLION rows deleted (and often put into an archive table during the transaction) while creating little to no blocking, never harming server performance and never filling up a tlog.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • ThomasRushton - Friday, October 27, 2017 4:54 AM

    Can you provide some small sample data showing what you expect to happen to each row?

    This is the sample:

    BEFORE:

    This is the result when I select the table Dbo.datedummy:
    datekey

    2017-12-01 00:00:00
    2017-12-02 00:00:00
    2017-12-03 00:00:00
    2017-12-04 00:00:00
    2017-12-05 00:00:00
    2017-12-06 00:00:00
    2017-12-07 00:00:00
    2017-12-08 00:00:00
    2017-12-09 00:00:00
    2017-12-10 00:00:00
    2017-12-11 00:00:00
    2017-12-12 00:00:00
    2017-12-13 00:00:00
    2017-12-14 00:00:00
    2017-12-15 00:00:00
    2017-12-16 00:00:00
    2017-12-17 00:00:00
    2017-12-18 00:00:00
    2017-12-19 00:00:00
    2017-12-20 00:00:00
    2017-12-21 00:00:00
    2017-12-22 00:00:00
    2017-12-23 00:00:00
    2017-12-24 00:00:00
    2017-12-25 00:00:00
    2017-12-26 00:00:00
    2017-12-27 00:00:00
    2017-12-28 00:00:00
    2017-12-29 00:00:00
    2017-12-30 00:00:00
    2017-12-31 00:00:00
    2017-11-01 00:00:00
    2017-11-02 00:00:00
    2017-11-03 00:00:00
    2017-11-04 00:00:00
    2017-11-05 00:00:00
    2017-11-06 00:00:00
    2017-11-07 00:00:00
    2017-11-08 00:00:00
    2017-11-09 00:00:00
    2017-11-10 00:00:00
    2017-11-11 00:00:00
    2017-11-12 00:00:00
    2017-11-13 00:00:00
    2017-11-14 00:00:00
    2017-11-15 00:00:00
    2017-11-16 00:00:00
    2017-11-17 00:00:00
    2017-11-18 00:00:00
    2017-11-19 00:00:00
    2017-11-20 00:00:00
    2017-11-21 00:00:00
    2017-11-22 00:00:00
    2017-11-23 00:00:00
    2017-11-24 00:00:00
    2017-11-25 00:00:00
    2017-11-26 00:00:00
    2017-11-27 00:00:00
    2017-11-28 00:00:00
    2017-11-29 00:00:00
    2017-11-30 00:00:00
    2017-10-01 00:00:00
    2017-10-02 00:00:00
    2017-10-03 00:00:00
    2017-10-04 00:00:00
    2017-10-05 00:00:00
    2017-10-06 00:00:00
    2017-10-07 00:00:00
    2017-10-08 00:00:00
    2017-10-09 00:00:00
    2017-10-10 00:00:00
    2017-10-11 00:00:00
    2017-10-12 00:00:00
    2017-10-13 00:00:00
    2017-10-14 00:00:00
    2017-10-15 00:00:00
    2017-10-16 00:00:00
    2017-10-17 00:00:00
    2017-10-18 00:00:00
    2017-10-19 00:00:00
    2017-10-20 00:00:00
    2017-10-21 00:00:00
    2017-10-22 00:00:00
    2017-10-23 00:00:00
    2017-10-24 00:00:00
    2017-10-25 00:00:00
    2017-10-26 00:00:00
    2017-10-27 00:00:00
    2017-10-28 00:00:00
    2017-10-29 00:00:00
    2017-10-30 00:00:00
    2017-10-31 00:00:00
    2017-09-01 00:00:00
    2017-09-02 00:00:00
    2017-09-03 00:00:00
    2017-09-04 00:00:00
    2017-09-05 00:00:00
    2017-09-06 00:00:00
    2017-09-07 00:00:00
    2017-09-08 00:00:00
    2017-09-09 00:00:00
    2017-09-10 00:00:00
    2017-09-11 00:00:00
    2017-09-12 00:00:00
    2017-09-13 00:00:00
    2017-09-14 00:00:00
    2017-09-15 00:00:00
    2017-09-16 00:00:00
    2017-09-17 00:00:00
    2017-09-18 00:00:00
    2017-09-19 00:00:00
    2017-09-20 00:00:00
    2017-09-21 00:00:00
    2017-09-22 00:00:00
    2017-09-23 00:00:00
    2017-09-24 00:00:00
    2017-09-25 00:00:00
    2017-09-26 00:00:00
    2017-09-27 00:00:00
    2017-09-28 00:00:00
    2017-09-29 00:00:00
    2017-09-30 00:00:00
    2017-08-01 00:00:00
    2017-08-02 00:00:00
    2017-08-03 00:00:00
    2017-08-04 00:00:00
    2017-08-05 00:00:00
    2017-08-06 00:00:00
    2017-08-07 00:00:00
    2017-08-08 00:00:00
    2017-08-09 00:00:00
    2017-08-10 00:00:00
    2017-08-11 00:00:00
    2017-08-12 00:00:00
    2017-08-13 00:00:00
    2017-08-14 00:00:00
    2017-08-15 00:00:00
    2017-08-16 00:00:00
    2017-08-17 00:00:00
    2017-08-18 00:00:00
    2017-08-19 00:00:00
    2017-08-20 00:00:00
    2017-08-21 00:00:00
    2017-08-22 00:00:00
    2017-08-23 00:00:00
    2017-08-24 00:00:00
    2017-08-25 00:00:00
    2017-08-26 00:00:00
    2017-08-27 00:00:00
    2017-08-28 00:00:00
    2017-08-29 00:00:00
    2017-08-30 00:00:00
    2017-08-31 00:00:00
    2017-07-01 00:00:00
    2017-07-02 00:00:00
    2017-07-03 00:00:00
    2017-07-04 00:00:00
    2017-07-05 00:00:00
    2017-07-06 00:00:00
    2017-07-07 00:00:00
    2017-07-08 00:00:00
    2017-07-09 00:00:00
    2017-07-10 00:00:00
    2017-07-11 00:00:00
    2017-07-12 00:00:00
    2017-07-13 00:00:00
    2017-07-14 00:00:00
    2017-07-15 00:00:00
    2017-07-16 00:00:00
    2017-07-17 00:00:00
    2017-07-18 00:00:00
    2017-07-19 00:00:00
    2017-07-20 00:00:00
    2017-07-21 00:00:00
    2017-07-22 00:00:00
    2017-07-23 00:00:00
    2017-07-24 00:00:00
    2017-07-25 00:00:00
    2017-07-26 00:00:00
    2017-07-27 00:00:00
    2017-07-28 00:00:00
    2017-07-29 00:00:00
    2017-07-30 00:00:00
    2017-07-31 00:00:00
    2017-06-01 00:00:00
    2017-06-02 00:00:00
    2017-06-03 00:00:00
    2017-06-04 00:00:00
    2017-06-05 00:00:00
    2017-06-06 00:00:00
    2017-06-07 00:00:00
    2017-06-08 00:00:00
    2017-06-09 00:00:00
    2017-06-10 00:00:00
    2017-06-11 00:00:00
    2017-06-12 00:00:00
    2017-06-13 00:00:00
    2017-06-14 00:00:00
    2017-06-15 00:00:00
    2017-06-16 00:00:00
    2017-06-17 00:00:00
    2017-06-18 00:00:00
    2017-06-19 00:00:00
    2017-06-20 00:00:00
    2017-06-21 00:00:00
    2017-06-22 00:00:00
    2017-06-23 00:00:00
    2017-06-24 00:00:00
    2017-06-25 00:00:00
    2017-06-26 00:00:00
    2017-06-27 00:00:00
    2017-06-28 00:00:00
    2017-06-29 00:00:00
    2017-06-30 00:00:00
    2017-05-01 00:00:00
    2017-05-02 00:00:00
    2017-05-03 00:00:00
    2017-05-04 00:00:00
    2017-05-05 00:00:00
    2017-05-06 00:00:00
    2017-05-07 00:00:00
    2017-05-08 00:00:00
    2017-05-09 00:00:00
    2017-05-10 00:00:00
    2017-05-11 00:00:00
    2017-05-12 00:00:00
    2017-05-13 00:00:00
    2017-05-14 00:00:00
    2017-05-15 00:00:00
    2017-05-16 00:00:00
    2017-05-17 00:00:00
    2017-05-18 00:00:00
    2017-05-19 00:00:00
    2017-05-20 00:00:00
    2017-05-21 00:00:00
    2017-05-22 00:00:00
    2017-05-23 00:00:00
    2017-05-24 00:00:00
    2017-05-25 00:00:00
    2017-05-26 00:00:00
    2017-05-27 00:00:00
    2017-05-28 00:00:00
    2017-05-29 00:00:00
    2017-05-30 00:00:00
    2017-05-31 00:00:00
    2017-04-01 00:00:00
    2017-04-02 00:00:00
    2017-04-03 00:00:00
    2017-04-04 00:00:00
    2017-04-05 00:00:00
    2017-04-06 00:00:00
    2017-04-07 00:00:00
    2017-04-08 00:00:00
    2017-04-09 00:00:00
    2017-04-10 00:00:00
    2017-04-11 00:00:00
    2017-04-12 00:00:00
    2017-04-13 00:00:00
    2017-04-14 00:00:00
    2017-04-15 00:00:00
    2017-04-16 00:00:00
    2017-04-17 00:00:00
    2017-04-18 00:00:00
    2017-04-19 00:00:00
    2017-04-20 00:00:00
    2017-04-21 00:00:00
    2017-04-22 00:00:00
    2017-04-23 00:00:00
    2017-04-24 00:00:00
    2017-04-25 00:00:00
    2017-04-26 00:00:00
    2017-04-27 00:00:00
    2017-04-28 00:00:00
    2017-04-29 00:00:00
    2017-04-30 00:00:00
    2017-03-01 00:00:00
    2017-03-02 00:00:00
    2017-03-03 00:00:00
    2017-03-04 00:00:00
    2017-03-05 00:00:00
    2017-03-06 00:00:00
    2017-03-07 00:00:00
    2017-03-08 00:00:00
    2017-03-09 00:00:00
    2017-03-10 00:00:00
    2017-03-11 00:00:00
    2017-03-12 00:00:00
    2017-03-13 00:00:00
    2017-03-14 00:00:00
    2017-03-15 00:00:00
    2017-03-16 00:00:00
    2017-03-17 00:00:00
    2017-03-18 00:00:00
    2017-03-19 00:00:00
    2017-03-20 00:00:00
    2017-03-21 00:00:00
    2017-03-22 00:00:00
    2017-03-23 00:00:00
    2017-03-24 00:00:00
    2017-03-25 00:00:00
    2017-03-26 00:00:00
    2017-03-27 00:00:00
    2017-03-28 00:00:00
    2017-03-29 00:00:00
    2017-03-30 00:00:00
    2017-03-31 00:00:00
    2017-02-01 00:00:00
    2017-02-02 00:00:00
    2017-02-03 00:00:00
    2017-02-04 00:00:00
    2017-02-05 00:00:00
    2017-02-06 00:00:00
    2017-02-07 00:00:00
    2017-02-08 00:00:00
    2017-02-09 00:00:00
    2017-02-10 00:00:00
    2017-02-11 00:00:00
    2017-02-12 00:00:00
    2017-02-13 00:00:00
    2017-02-14 00:00:00
    2017-02-15 00:00:00
    2017-02-16 00:00:00
    2017-02-17 00:00:00
    2017-02-18 00:00:00
    2017-02-19 00:00:00
    2017-02-20 00:00:00
    2017-02-21 00:00:00
    2017-02-22 00:00:00
    2017-02-23 00:00:00
    2017-02-24 00:00:00
    2017-02-25 00:00:00
    2017-02-26 00:00:00
    2017-02-27 00:00:00
    2017-02-28 00:00:00
    2017-01-01 00:00:00
    2017-01-02 00:00:00
    2017-01-03 00:00:00
    2017-01-04 00:00:00
    2017-01-05 00:00:00
    2017-01-06 00:00:00
    2017-01-07 00:00:00
    2017-01-08 00:00:00
    2017-01-09 00:00:00
    2017-01-10 00:00:00
    2017-01-11 00:00:00
    2017-01-12 00:00:00
    2017-01-13 00:00:00
    2017-01-14 00:00:00
    2017-01-15 00:00:00
    2017-01-16 00:00:00
    2017-01-17 00:00:00
    2017-01-18 00:00:00
    2017-01-19 00:00:00
    2017-01-20 00:00:00
    2017-01-21 00:00:00
    2017-01-22 00:00:00
    2017-01-23 00:00:00
    2017-01-24 00:00:00
    2017-01-25 00:00:00
    2017-01-26 00:00:00
    2017-01-27 00:00:00
    2017-01-28 00:00:00
    2017-01-29 00:00:00
    2017-01-30 00:00:00
    2017-01-31 00:00:00
    2016-12-01 00:00:00
    2016-12-02 00:00:00
    2016-12-03 00:00:00
    2016-12-04 00:00:00
    2016-12-05 00:00:00
    2016-12-06 00:00:00
    2016-12-07 00:00:00
    2016-12-08 00:00:00
    2016-12-09 00:00:00
    2016-12-10 00:00:00
    2016-12-11 00:00:00
    2016-12-12 00:00:00
    2016-12-13 00:00:00
    2016-12-14 00:00:00
    2016-12-15 00:00:00
    2016-12-16 00:00:00
    2016-12-17 00:00:00
    2016-12-18 00:00:00
    2016-12-19 00:00:00
    2016-12-20 00:00:00
    2016-12-21 00:00:00
    2016-12-22 00:00:00
    2016-12-23 00:00:00
    2016-12-24 00:00:00
    2016-12-25 00:00:00
    2016-12-26 00:00:00
    2016-12-27 00:00:00
    2016-12-28 00:00:00
    2016-12-29 00:00:00
    2016-12-30 00:00:00
    2016-12-31 00:00:00
    2016-11-01 00:00:00
    2016-11-02 00:00:00
    2016-11-03 00:00:00
    2016-11-04 00:00:00
    2016-11-05 00:00:00
    2016-11-06 00:00:00
    2016-11-07 00:00:00
    2016-11-08 00:00:00
    2016-11-09 00:00:00
    2016-11-10 00:00:00
    2016-11-11 00:00:00
    2016-11-12 00:00:00
    2016-11-13 00:00:00
    2016-11-14 00:00:00
    2016-11-15 00:00:00
    2016-11-16 00:00:00
    2016-11-17 00:00:00
    2016-11-18 00:00:00
    2016-11-19 00:00:00
    2016-11-20 00:00:00
    2016-11-21 00:00:00
    2016-11-22 00:00:00
    2016-11-23 00:00:00
    2016-11-24 00:00:00
    2016-11-25 00:00:00
    2016-11-26 00:00:00
    2016-11-27 00:00:00
    2016-11-28 00:00:00
    2016-11-29 00:00:00
    2016-11-30 00:00:00
    2016-10-01 00:00:00
    2016-10-02 00:00:00
    2016-10-03 00:00:00
    2016-10-04 00:00:00
    2016-10-05 00:00:00
    2016-10-06 00:00:00
    2016-10-07 00:00:00
    2016-10-08 00:00:00
    2016-10-09 00:00:00
    2016-10-10 00:00:00
    2016-10-11 00:00:00
    2016-10-12 00:00:00
    2016-10-13 00:00:00
    2016-10-14 00:00:00
    2016-10-15 00:00:00
    2016-10-16 00:00:00
    2016-10-17 00:00:00
    2016-10-18 00:00:00
    2016-10-19 00:00:00
    2016-10-20 00:00:00
    2016-10-21 00:00:00
    2016-10-22 00:00:00
    2016-10-23 00:00:00
    2016-10-24 00:00:00
    2016-10-25 00:00:00
    2016-10-26 00:00:00
    2016-10-27 00:00:00
    2016-10-28 00:00:00
    2016-10-29 00:00:00
    2016-10-30 00:00:00
    2016-10-31 00:00:00
    2016-09-01 00:00:00
    2016-09-02 00:00:00
    2016-09-03 00:00:00
    2016-09-04 00:00:00
    2016-09-05 00:00:00
    2016-09-06 00:00:00
    2016-09-07 00:00:00
    2016-09-08 00:00:00
    2016-09-09 00:00:00
    2016-09-10 00:00:00
    2016-09-11 00:00:00
    2016-09-12 00:00:00
    2016-09-13 00:00:00
    2016-09-14 00:00:00
    2016-09-15 00:00:00
    2016-09-16 00:00:00
    2016-09-17 00:00:00
    2016-09-18 00:00:00
    2016-09-19 00:00:00
    2016-09-20 00:00:00
    2016-09-21 00:00:00
    2016-09-22 00:00:00
    2016-09-23 00:00:00
    2016-09-24 00:00:00
    2016-09-25 00:00:00
    2016-09-26 00:00:00
    2016-09-27 00:00:00
    2016-09-28 00:00:00
    2016-09-29 00:00:00
    2016-09-30 00:00:00
    2016-08-01 00:00:00
    2016-08-02 00:00:00
    2016-08-03 00:00:00
    2016-08-04 00:00:00
    2016-08-05 00:00:00
    2016-08-06 00:00:00
    2016-08-07 00:00:00
    2016-08-08 00:00:00
    2016-08-09 00:00:00
    2016-08-10 00:00:00
    2016-08-11 00:00:00
    2016-08-12 00:00:00
    2016-08-13 00:00:00
    2016-08-14 00:00:00
    2016-08-15 00:00:00
    2016-08-16 00:00:00
    2016-08-17 00:00:00
    2016-08-18 00:00:00
    2016-08-19 00:00:00
    2016-08-20 00:00:00
    2016-08-21 00:00:00
    2016-08-22 00:00:00
    2016-08-23 00:00:00
    2016-08-24 00:00:00
    2016-08-25 00:00:00
    2016-08-26 00:00:00
    2016-08-27 00:00:00
    2016-08-28 00:00:00
    2016-08-29 00:00:00
    2016-08-30 00:00:00
    2016-08-31 00:00:00
    2016-07-01 00:00:00
    2016-07-02 00:00:00
    2016-07-03 00:00:00
    2016-07-04 00:00:00
    2016-07-05 00:00:00
    2016-07-06 00:00:00
    2016-07-07 00:00:00
    2016-07-08 00:00:00
    2016-07-09 00:00:00
    2016-07-10 00:00:00
    2016-07-11 00:00:00
    2016-07-12 00:00:00
    2016-07-13 00:00:00
    2016-07-14 00:00:00
    2016-07-15 00:00:00
    2016-07-16 00:00:00
    2016-07-17 00:00:00
    2016-07-18 00:00:00
    2016-07-19 00:00:00
    2016-07-20 00:00:00
    2016-07-21 00:00:00
    2016-07-22 00:00:00
    2016-07-23 00:00:00
    2016-07-24 00:00:00
    2016-07-25 00:00:00
    2016-07-26 00:00:00
    2016-07-27 00:00:00
    2016-07-28 00:00:00
    2016-07-29 00:00:00
    2016-07-30 00:00:00
    2016-07-31 00:00:00
    2016-06-01 00:00:00
    2016-06-02 00:00:00
    2016-06-03 00:00:00
    2016-06-04 00:00:00
    2016-06-05 00:00:00
    2016-06-06 00:00:00
    2016-06-07 00:00:00
    2016-06-08 00:00:00
    2016-06-09 00:00:00
    2016-06-10 00:00:00
    2016-06-11 00:00:00
    2016-06-12 00:00:00
    2016-06-13 00:00:00
    2016-06-14 00:00:00
    2016-06-15 00:00:00
    2016-06-16 00:00:00
    2016-06-17 00:00:00
    2016-06-18 00:00:00
    2016-06-19 00:00:00
    2016-06-20 00:00:00
    2016-06-21 00:00:00
    2016-06-22 00:00:00
    2016-06-23 00:00:00
    2016-06-24 00:00:00
    2016-06-25 00:00:00
    2016-06-26 00:00:00
    2016-06-27 00:00:00
    2016-06-28 00:00:00
    2016-06-29 00:00:00
    2016-06-30 00:00:00
    2016-05-01 00:00:00
    2016-05-02 00:00:00
    2016-05-03 00:00:00
    2016-05-04 00:00:00
    2016-05-05 00:00:00
    2016-05-06 00:00:00
    2016-05-07 00:00:00
    2016-05-08 00:00:00
    2016-05-09 00:00:00
    2016-05-10 00:00:00
    2016-05-11 00:00:00
    2016-05-12 00:00:00
    2016-05-13 00:00:00
    2016-05-14 00:00:00
    2016-05-15 00:00:00
    2016-05-16 00:00:00
    2016-05-17 00:00:00
    2016-05-18 00:00:00
    2016-05-19 00:00:00
    2016-05-20 00:00:00
    2016-05-21 00:00:00
    2016-05-22 00:00:00
    2016-05-23 00:00:00
    2016-05-24 00:00:00
    2016-05-25 00:00:00
    2016-05-26 00:00:00
    2016-05-27 00:00:00
    2016-05-28 00:00:00
    2016-05-29 00:00:00
    2016-05-30 00:00:00
    2016-05-31 00:00:00
    2016-04-01 00:00:00
    2016-04-02 00:00:00
    2016-04-03 00:00:00
    2016-04-04 00:00:00
    2016-04-05 00:00:00
    2016-04-06 00:00:00
    2016-04-07 00:00:00
    2016-04-08 00:00:00
    2016-04-09 00:00:00
    2016-04-10 00:00:00
    2016-04-11 00:00:00
    2016-04-12 00:00:00
    2016-04-13 00:00:00
    2016-04-14 00:00:00
    2016-04-15 00:00:00
    2016-04-16 00:00:00
    2016-04-17 00:00:00
    2016-04-18 00:00:00
    2016-04-19 00:00:00
    2016-04-20 00:00:00
    2016-04-21 00:00:00
    2016-04-22 00:00:00
    2016-04-23 00:00:00
    2016-04-24 00:00:00
    2016-04-25 00:00:00
    2016-04-26 00:00:00
    2016-04-27 00:00:00
    2016-04-28 00:00:00
    2016-04-29 00:00:00
    2016-04-30 00:00:00
    2016-03-01 00:00:00
    2016-03-02 00:00:00
    2016-03-03 00:00:00
    2016-03-04 00:00:00
    2016-03-05 00:00:00
    2016-03-06 00:00:00
    2016-03-07 00:00:00
    2016-03-08 00:00:00
    2016-03-09 00:00:00
    2016-03-10 00:00:00
    2016-03-11 00:00:00
    2016-03-12 00:00:00
    2016-03-13 00:00:00
    2016-03-14 00:00:00
    2016-03-15 00:00:00
    2016-03-16 00:00:00
    2016-03-17 00:00:00
    2016-03-18 00:00:00
    2016-03-19 00:00:00
    2016-03-20 00:00:00
    2016-03-21 00:00:00
    2016-03-22 00:00:00
    2016-03-23 00:00:00
    2016-03-24 00:00:00
    2016-03-25 00:00:00
    2016-03-26 00:00:00
    2016-03-27 00:00:00
    2016-03-28 00:00:00
    2016-03-29 00:00:00
    2016-03-30 00:00:00
    2016-03-31 00:00:00
    2016-02-01 00:00:00
    2016-02-02 00:00:00
    2016-02-03 00:00:00
    2016-02-04 00:00:00
    2016-02-05 00:00:00
    2016-02-06 00:00:00
    2016-02-07 00:00:00
    2016-02-08 00:00:00
    2016-02-09 00:00:00
    2016-02-10 00:00:00
    2016-02-11 00:00:00
    2016-02-12 00:00:00
    2016-02-13 00:00:00
    2016-02-14 00:00:00
    2016-02-15 00:00:00
    2016-02-16 00:00:00
    2016-02-17 00:00:00
    2016-02-18 00:00:00
    2016-02-19 00:00:00
    2016-02-20 00:00:00
    2016-02-21 00:00:00
    2016-02-22 00:00:00
    2016-02-23 00:00:00
    2016-02-24 00:00:00
    2016-02-25 00:00:00
    2016-02-26 00:00:00
    2016-02-27 00:00:00
    2016-02-28 00:00:00
    2016-02-29 00:00:00
    2016-01-01 00:00:00
    2016-01-02 00:00:00
    2016-01-03 00:00:00
    2016-01-04 00:00:00
    2016-01-05 00:00:00
    2016-01-06 00:00:00
    2016-01-07 00:00:00
    2016-01-08 00:00:00
    2016-01-09 00:00:00
    2016-01-10 00:00:00
    2016-01-11 00:00:00
    2016-01-12 00:00:00
    2016-01-13 00:00:00
    2016-01-14 00:00:00
    2016-01-15 00:00:00
    2016-01-16 00:00:00
    2016-01-17 00:00:00
    2016-01-18 00:00:00
    2016-01-19 00:00:00
    2016-01-20 00:00:00
    2016-01-21 00:00:00
    2016-01-22 00:00:00
    2016-01-23 00:00:00
    2016-01-24 00:00:00
    2016-01-25 00:00:00
    2016-01-26 00:00:00
    2016-01-27 00:00:00
    2016-01-28 00:00:00
    2016-01-29 00:00:00
    2016-01-30 00:00:00
    2016-01-31 00:00:00
    2015-12-01 00:00:00
    2015-12-02 00:00:00
    2015-12-03 00:00:00
    2015-12-04 00:00:00
    2015-12-05 00:00:00
    2015-12-06 00:00:00
    2015-12-07 00:00:00
    2015-12-08 00:00:00
    2015-12-09 00:00:00
    2015-12-10 00:00:00
    2015-12-11 00:00:00
    2015-12-12 00:00:00
    2015-12-13 00:00:00
    2015-12-14 00:00:00
    2015-12-15 00:00:00
    2015-12-16 00:00:00
    2015-12-17 00:00:00
    2015-12-18 00:00:00
    2015-12-19 00:00:00
    2015-12-20 00:00:00
    2015-12-21 00:00:00
    2015-12-22 00:00:00
    2015-12-23 00:00:00
    2015-12-24 00:00:00
    2015-12-25 00:00:00
    2015-12-26 00:00:00
    2015-12-27 00:00:00
    2015-12-28 00:00:00
    2015-12-29 00:00:00
    2015-12-30 00:00:00
    2015-12-31 00:00:00
    2015-11-01 00:00:00
    2015-11-02 00:00:00
    2015-11-03 00:00:00
    2015-11-04 00:00:00
    2015-11-05 00:00:00
    2015-11-06 00:00:00
    2015-11-07 00:00:00
    2015-11-08 00:00:00
    2015-11-09 00:00:00
    2015-11-10 00:00:00
    2015-11-11 00:00:00
    2015-11-12 00:00:00
    2015-11-13 00:00:00
    2015-11-14 00:00:00
    2015-11-15 00:00:00
    2015-11-16 00:00:00
    2015-11-17 00:00:00
    2015-11-18 00:00:00
    2015-11-19 00:00:00
    2015-11-20 00:00:00
    2015-11-21 00:00:00
    2015-11-22 00:00:00
    2015-11-23 00:00:00
    2015-11-24 00:00:00
    2015-11-25 00:00:00
    2015-11-26 00:00:00
    2015-11-27 00:00:00
    2015-11-28 00:00:00
    2015-11-29 00:00:00
    2015-11-30 00:00:00
    2015-10-01 00:00:00
    2015-10-02 00:00:00
    2015-10-03 00:00:00
    2015-10-04 00:00:00
    2015-10-05 00:00:00
    2015-10-06 00:00:00
    2015-10-07 00:00:00
    2015-10-08 00:00:00
    2015-10-09 00:00:00
    2015-10-10 00:00:00
    2015-10-11 00:00:00
    2015-10-12 00:00:00
    2015-10-13 00:00:00
    2015-10-14 00:00:00
    2015-10-15 00:00:00
    2015-10-16 00:00:00
    2015-10-17 00:00:00
    2015-10-18 00:00:00
    2015-10-19 00:00:00
    2015-10-20 00:00:00
    2015-10-21 00:00:00
    2015-10-22 00:00:00
    2015-10-23 00:00:00
    2015-10-24 00:00:00
    2015-10-25 00:00:00
    2015-10-26 00:00:00
    2015-10-27 00:00:00
    2015-10-28 00:00:00
    2015-10-29 00:00:00
    2015-10-30 00:00:00
    2015-10-31 00:00:00
    2015-09-01 00:00:00
    2015-09-02 00:00:00
    2015-09-03 00:00:00
    2015-09-04 00:00:00
    2015-09-05 00:00:00
    2015-09-06 00:00:00
    2015-09-07 00:00:00
    2015-09-08 00:00:00
    2015-09-09 00:00:00
    2015-09-10 00:00:00
    2015-09-11 00:00:00
    2015-09-12 00:00:00
    2015-09-13 00:00:00
    2015-09-14 00:00:00
    2015-09-15 00:00:00
    2015-09-16 00:00:00
    2015-09-17 00:00:00
    2015-09-18 00:00:00
    2015-09-19 00:00:00
    2015-09-20 00:00:00
    2015-09-21 00:00:00
    2015-09-22 00:00:00
    2015-09-23 00:00:00
    2015-09-24 00:00:00
    2015-09-25 00:00:00
    2015-09-26 00:00:00
    2015-09-27 00:00:00
    2015-09-28 00:00:00
    2015-09-29 00:00:00
    2015-09-30 00:00:00
    2015-08-01 00:00:00
    2015-08-02 00:00:00
    2015-08-03 00:00:00
    2015-08-04 00:00:00
    2015-08-05 00:00:00
    2015-08-06 00:00:00
    2015-08-07 00:00:00
    2015-08-08 00:00:00
    2015-08-09 00:00:00
    2015-08-10 00:00:00
    2015-08-11 00:00:00
    2015-08-12 00:00:00
    2015-08-13 00:00:00
    2015-08-14 00:00:00
    2015-08-15 00:00:00
    2015-08-16 00:00:00
    2015-08-17 00:00:00
    2015-08-18 00:00:00
    2015-08-19 00:00:00
    2015-08-20 00:00:00
    2015-08-21 00:00:00
    2015-08-22 00:00:00
    2015-08-23 00:00:00
    2015-08-24 00:00:00
    2015-08-25 00:00:00
    2015-08-26 00:00:00
    2015-08-27 00:00:00
    2015-08-28 00:00:00
    2015-08-29 00:00:00
    2015-08-30 00:00:00
    2015-08-31 00:00:00
    2015-07-01 00:00:00
    2015-07-02 00:00:00
    2015-07-03 00:00:00
    2015-07-04 00:00:00
    2015-07-05 00:00:00
    2015-07-06 00:00:00
    2015-07-07 00:00:00
    2015-07-08 00:00:00
    2015-07-09 00:00:00
    2015-07-10 00:00:00
    2015-07-11 00:00:00
    2015-07-12 00:00:00
    2015-07-13 00:00:00
    2015-07-14 00:00:00
    2015-07-15 00:00:00
    2015-07-16 00:00:00
    2015-07-17 00:00:00
    2015-07-18 00:00:00
    2015-07-19 00:00:00
    2015-07-20 00:00:00
    2015-07-21 00:00:00
    2015-07-22 00:00:00
    2015-07-23 00:00:00
    2015-07-24 00:00:00
    2015-07-25 00:00:00
    2015-07-26 00:00:00
    2015-07-27 00:00:00
    2015-07-28 00:00:00
    2015-07-29 00:00:00
    2015-07-30 00:00:00
    2015-07-31 00:00:00
    2015-06-01 00:00:00
    2015-06-02 00:00:00
    2015-06-03 00:00:00
    2015-06-04 00:00:00
    2015-06-05 00:00:00
    2015-06-06 00:00:00
    2015-06-07 00:00:00
    2015-06-08 00:00:00
    2015-06-09 00:00:00
    2015-06-10 00:00:00
    2015-06-11 00:00:00
    2015-06-12 00:00:00
    2015-06-13 00:00:00
    2015-06-14 00:00:00
    2015-06-15 00:00:00
    2015-06-16 00:00:00
    2015-06-17 00:00:00
    2015-06-18 00:00:00
    2015-06-19 00:00:00
    2015-06-20 00:00:00
    2015-06-21 00:00:00
    2015-06-22 00:00:00
    2015-06-23 00:00:00
    2015-06-24 00:00:00
    2015-06-25 00:00:00
    2015-06-26 00:00:00
    2015-06-27 00:00:00
    2015-06-28 00:00:00
    2015-06-29 00:00:00
    2015-06-30 00:00:00
    2015-05-01 00:00:00
    2015-05-02 00:00:00
    2015-05-03 00:00:00
    2015-05-04 00:00:00
    2015-05-05 00:00:00
    2015-05-06 00:00:00
    2015-05-07 00:00:00
    2015-05-08 00:00:00
    2015-05-09 00:00:00
    2015-05-10 00:00:00
    2015-05-11 00:00:00
    2015-05-12 00:00:00
    2015-05-13 00:00:00
    2015-05-14 00:00:00
    2015-05-15 00:00:00
    2015-05-16 00:00:00
    2015-05-17 00:00:00
    2015-05-18 00:00:00
    2015-05-19 00:00:00
    2015-05-20 00:00:00
    2015-05-21 00:00:00
    2015-05-22 00:00:00
    2015-05-23 00:00:00
    2015-05-24 00:00:00
    2015-05-25 00:00:00
    2015-05-26 00:00:00
    2015-05-27 00:00:00
    2015-05-28 00:00:00
    2015-05-29 00:00:00
    2015-05-30 00:00:00
    2015-05-31 00:00:00
    2015-04-01 00:00:00
    2015-04-02 00:00:00
    2015-04-03 00:00:00
    2015-04-04 00:00:00
    2015-04-05 00:00:00
    2015-04-06 00:00:00
    2015-04-07 00:00:00
    2015-04-08 00:00:00
    2015-04-09 00:00:00
    2015-04-10 00:00:00
    2015-04-11 00:00:00
    2015-04-12 00:00:00
    2015-04-13 00:00:00
    2015-04-14 00:00:00
    2015-04-15 00:00:00
    2015-04-16 00:00:00
    2015-04-17 00:00:00
    2015-04-18 00:00:00
    2015-04-19 00:00:00
    2015-04-20 00:00:00
    2015-04-21 00:00:00
    2015-04-22 00:00:00
    2015-04-23 00:00:00
    2015-04-24 00:00:00
    2015-04-25 00:00:00
    2015-04-26 00:00:00
    2015-04-27 00:00:00
    2015-04-28 00:00:00
    2015-04-29 00:00:00
    2015-04-30 00:00:00
    2015-03-01 00:00:00
    2015-03-02 00:00:00
    2015-03-03 00:00:00
    2015-03-04 00:00:00
    2015-03-05 00:00:00
    2015-03-06 00:00:00
    2015-03-07 00:00:00
    2015-03-08 00:00:00
    2015-03-09 00:00:00
    2015-03-10 00:00:00
    2015-03-11 00:00:00
    2015-03-12 00:00:00
    2015-03-13 00:00:00
    2015-03-14 00:00:00
    2015-03-15 00:00:00
    2015-03-16 00:00:00
    2015-03-17 00:00:00
    2015-03-18 00:00:00
    2015-03-19 00:00:00
    2015-03-20 00:00:00
    2015-03-21 00:00:00
    2015-03-22 00:00:00
    2015-03-23 00:00:00
    2015-03-24 00:00:00
    2015-03-25 00:00:00
    2015-03-26 00:00:00
    2015-03-27 00:00:00
    2015-03-28 00:00:00
    2015-03-29 00:00:00
    2015-03-30 00:00:00
    2015-03-31 00:00:00
    2015-02-01 00:00:00
    2015-02-02 00:00:00
    2015-02-03 00:00:00
    2015-02-04 00:00:00
    2015-02-05 00:00:00
    2015-02-06 00:00:00
    2015-02-07 00:00:00
    2015-02-08 00:00:00
    2015-02-09 00:00:00
    2015-02-10 00:00:00
    2015-02-11 00:00:00
    2015-02-12 00:00:00
    2015-02-13 00:00:00
    2015-02-14 00:00:00
    2015-02-15 00:00:00
    2015-02-16 00:00:00
    2015-02-17 00:00:00
    2015-02-18 00:00:00
    2015-02-19 00:00:00
    2015-02-20 00:00:00
    2015-02-21 00:00:00
    2015-02-22 00:00:00
    2015-02-23 00:00:00
    2015-02-24 00:00:00
    2015-02-25 00:00:00
    2015-02-26 00:00:00
    2015-02-27 00:00:00
    2015-02-28 00:00:00
    2015-01-01 00:00:00
    2015-01-02 00:00:00
    2015-01-03 00:00:00
    2015-01-04 00:00:00
    2015-01-05 00:00:00
    2015-01-06 00:00:00
    2015-01-07 00:00:00
    2015-01-08 00:00:00
    2015-01-09 00:00:00
    2015-01-10 00:00:00
    2015-01-11 00:00:00
    2015-01-12 00:00:00
    2015-01-13 00:00:00
    2015-01-14 00:00:00
    2015-01-15 00:00:00
    2015-01-16 00:00:00
    2015-01-17 00:00:00
    2015-01-18 00:00:00
    2015-01-19 00:00:00
    2015-01-20 00:00:00
    2015-01-21 00:00:00
    2015-01-22 00:00:00
    2015-01-23 00:00:00
    2015-01-24 00:00:00
    2015-01-25 00:00:00
    2015-01-26 00:00:00
    2015-01-27 00:00:00
    2015-01-28 00:00:00
    2015-01-29 00:00:00
    2015-01-30 00:00:00
    2015-01-31 00:00:00

    This is the PRINT @sqlstate at the Stored Prodecure:

    select 1 while @@ROWCOUNT > 0 BEGIN delete top (5000) from DWIM_SRCE_IMG.dbo.DB_DATEDummy where DATEKEY < '2017-05-31'
            and DATEKEY not in ('2017-05-31',
    '2017-04-30',
    '2017-03-31',
    '2017-02-28',
    '2017-01-31',
    '2016-12-31',
    '2016-11-30',
    '2016-10-31',
    '2016-09-30',
    '2016-08-31',
    '2016-07-31',
    '2016-06-30',
    '2016-05-31',
    '2016-04-30',
    '2016-03-31',
    '2016-02-29',
    '2016-01-31',
    '2015-12-31',
    '2015-11-30',
    '2015-10-31',
    '2015-09-30',
    '2015-08-31',
    '2015-07-31',
    '2015-06-30',
    '2015-05-31',
    '2015-04-30'
    ) END

    AND The Result, After I execute the Stored Procedure:

    Datekey:
    2017-12-01 00:00:00
    2017-12-02 00:00:00
    2017-12-03 00:00:00
    2017-12-04 00:00:00
    2017-12-05 00:00:00
    2017-12-06 00:00:00
    2017-12-07 00:00:00
    2017-12-08 00:00:00
    2017-12-09 00:00:00
    2017-12-10 00:00:00
    2017-12-11 00:00:00
    2017-12-12 00:00:00
    2017-12-13 00:00:00
    2017-12-14 00:00:00
    2017-12-15 00:00:00
    2017-12-16 00:00:00
    2017-12-17 00:00:00
    2017-12-18 00:00:00
    2017-12-19 00:00:00
    2017-12-20 00:00:00
    2017-12-21 00:00:00
    2017-12-22 00:00:00
    2017-12-23 00:00:00
    2017-12-24 00:00:00
    2017-12-25 00:00:00
    2017-12-26 00:00:00
    2017-12-27 00:00:00
    2017-12-28 00:00:00
    2017-12-29 00:00:00
    2017-12-30 00:00:00
    2017-12-31 00:00:00
    2017-11-01 00:00:00
    2017-11-02 00:00:00
    2017-11-03 00:00:00
    2017-11-04 00:00:00
    2017-11-05 00:00:00
    2017-11-06 00:00:00
    2017-11-07 00:00:00
    2017-11-08 00:00:00
    2017-11-09 00:00:00
    2017-11-10 00:00:00
    2017-11-11 00:00:00
    2017-11-12 00:00:00
    2017-11-13 00:00:00
    2017-11-14 00:00:00
    2017-11-15 00:00:00
    2017-11-16 00:00:00
    2017-11-17 00:00:00
    2017-11-18 00:00:00
    2017-11-19 00:00:00
    2017-11-20 00:00:00
    2017-11-21 00:00:00
    2017-11-22 00:00:00
    2017-11-23 00:00:00
    2017-11-24 00:00:00
    2017-11-25 00:00:00
    2017-11-26 00:00:00
    2017-11-27 00:00:00
    2017-11-28 00:00:00
    2017-11-29 00:00:00
    2017-11-30 00:00:00
    2017-10-01 00:00:00
    2017-10-02 00:00:00
    2017-10-03 00:00:00
    2017-10-04 00:00:00
    2017-10-05 00:00:00
    2017-10-06 00:00:00
    2017-10-07 00:00:00
    2017-10-08 00:00:00
    2017-10-09 00:00:00
    2017-10-10 00:00:00
    2017-10-11 00:00:00
    2017-10-12 00:00:00
    2017-10-13 00:00:00
    2017-10-14 00:00:00
    2017-10-15 00:00:00
    2017-10-16 00:00:00
    2017-10-17 00:00:00
    2017-10-18 00:00:00
    2017-10-19 00:00:00
    2017-10-20 00:00:00
    2017-10-21 00:00:00
    2017-10-22 00:00:00
    2017-10-23 00:00:00
    2017-10-24 00:00:00
    2017-10-25 00:00:00
    2017-10-26 00:00:00
    2017-10-27 00:00:00
    2017-10-28 00:00:00
    2017-10-29 00:00:00
    2017-10-30 00:00:00
    2017-10-31 00:00:00
    2017-09-01 00:00:00
    2017-09-02 00:00:00
    2017-09-03 00:00:00
    2017-09-04 00:00:00
    2017-09-05 00:00:00
    2017-09-06 00:00:00
    2017-09-07 00:00:00
    2017-09-08 00:00:00
    2017-09-09 00:00:00
    2017-09-10 00:00:00
    2017-09-11 00:00:00
    2017-09-12 00:00:00
    2017-09-13 00:00:00
    2017-09-14 00:00:00
    2017-09-15 00:00:00
    2017-09-16 00:00:00
    2017-09-17 00:00:00
    2017-09-18 00:00:00
    2017-09-19 00:00:00
    2017-09-20 00:00:00
    2017-09-21 00:00:00
    2017-09-22 00:00:00
    2017-09-23 00:00:00
    2017-09-24 00:00:00
    2017-09-25 00:00:00
    2017-09-26 00:00:00
    2017-09-27 00:00:00
    2017-09-28 00:00:00
    2017-09-29 00:00:00
    2017-09-30 00:00:00
    2017-08-01 00:00:00
    2017-08-02 00:00:00
    2017-08-03 00:00:00
    2017-08-04 00:00:00
    2017-08-05 00:00:00
    2017-08-06 00:00:00
    2017-08-07 00:00:00
    2017-08-08 00:00:00
    2017-08-09 00:00:00
    2017-08-10 00:00:00
    2017-08-11 00:00:00
    2017-08-12 00:00:00
    2017-08-13 00:00:00
    2017-08-14 00:00:00
    2017-08-15 00:00:00
    2017-08-16 00:00:00
    2017-08-17 00:00:00
    2017-08-18 00:00:00
    2017-08-19 00:00:00
    2017-08-20 00:00:00
    2017-08-21 00:00:00
    2017-08-22 00:00:00
    2017-08-23 00:00:00
    2017-08-24 00:00:00
    2017-08-25 00:00:00
    2017-08-26 00:00:00
    2017-08-27 00:00:00
    2017-08-28 00:00:00
    2017-08-29 00:00:00
    2017-08-30 00:00:00
    2017-08-31 00:00:00
    2017-07-01 00:00:00
    2017-07-02 00:00:00
    2017-07-03 00:00:00
    2017-07-04 00:00:00
    2017-07-05 00:00:00
    2017-07-06 00:00:00
    2017-07-07 00:00:00
    2017-07-08 00:00:00
    2017-07-09 00:00:00
    2017-07-10 00:00:00
    2017-07-11 00:00:00
    2017-07-12 00:00:00
    2017-07-13 00:00:00
    2017-07-14 00:00:00
    2017-07-15 00:00:00
    2017-07-16 00:00:00
    2017-07-17 00:00:00
    2017-07-18 00:00:00
    2017-07-19 00:00:00
    2017-07-20 00:00:00
    2017-07-21 00:00:00
    2017-07-22 00:00:00
    2017-07-23 00:00:00
    2017-07-24 00:00:00
    2017-07-25 00:00:00
    2017-07-26 00:00:00
    2017-07-27 00:00:00
    2017-07-28 00:00:00
    2017-07-29 00:00:00
    2017-07-30 00:00:00
    2017-07-31 00:00:00
    2017-06-01 00:00:00
    2017-06-02 00:00:00
    2017-06-03 00:00:00
    2017-06-04 00:00:00
    2017-06-05 00:00:00
    2017-06-06 00:00:00
    2017-06-07 00:00:00
    2017-06-08 00:00:00
    2017-06-09 00:00:00
    2017-06-10 00:00:00
    2017-06-11 00:00:00
    2017-06-12 00:00:00
    2017-06-13 00:00:00
    2017-06-14 00:00:00
    2017-06-15 00:00:00
    2017-06-16 00:00:00
    2017-06-17 00:00:00
    2017-06-18 00:00:00
    2017-06-19 00:00:00
    2017-06-20 00:00:00
    2017-06-21 00:00:00
    2017-06-22 00:00:00
    2017-06-23 00:00:00
    2017-06-24 00:00:00
    2017-06-25 00:00:00
    2017-06-26 00:00:00
    2017-06-27 00:00:00
    2017-06-28 00:00:00
    2017-06-29 00:00:00
    2017-06-30 00:00:00
    2017-05-31 00:00:00
    2017-04-30 00:00:00
    2017-03-31 00:00:00
    2017-02-28 00:00:00
    2017-01-31 00:00:00
    2016-12-31 00:00:00
    2016-11-30 00:00:00
    2016-10-31 00:00:00
    2016-09-30 00:00:00
    2016-08-31 00:00:00
    2016-07-31 00:00:00
    2016-06-30 00:00:00
    2016-05-31 00:00:00
    2016-04-30 00:00:00
    2016-03-31 00:00:00
    2016-02-29 00:00:00
    2016-01-31 00:00:00
    2015-12-31 00:00:00
    2015-11-30 00:00:00
    2015-10-31 00:00:00
    2015-09-30 00:00:00
    2015-08-31 00:00:00
    2015-07-31 00:00:00
    2015-06-30 00:00:00
    2015-05-31 00:00:00
    2015-04-30 00:00:00

  • Jeff Moden - Friday, October 27, 2017 6:47 AM

    The way you're going about it will require constant changes to the stored procedure each month.  Further and based on the number of months that you look like you're trying to delete on the initial run, you could be setting yourself up for a logfile and backup explosion.  The problem is that we can't tell with the information provided because it just does appear to match your description of what to delete.

    We need to know the following...
    1.  Is the name of the table you want to delete from actually "dbo.DB_DATE"??? I have my doubt there.  That seems like it would be a Calendar table of sorts so please confirm what the name of the table is that you want to delete from.
    2.  You also have the rule that for rows "Over 6 months" in age, you want to "Keep only the last day of the record (ex: 30 Apr 2017, 31 March 2017 ,etc".  You haven't identified how to identify "the record" to keep and we can't tell because it looks like you're deleting from a Calendar table.  Further, are the multiple accounts (or whatever) per month that you want to keep "the last record" for?

    As a bit of a side bar and depending on the content and purpose of the actual table you're trying to delete from, I thing this whole thing might be a mistake.  You're deleting a hell of a lot of history.  If it's transactional history for customers, you may be in violation of state or other laws.  It may be that instead of deleting data, you should be safely archiving the data.

    Anyway, please provide the info for the two question I asked so we can help you better because the code you provided isn't doing much for us. to help.

    Hai Jeff,

    1. I'm not delete the real actually "dbo.DB_DATE" 
     but the Dummy ( I Create the Dummy based on the Real One)

    2. I already give the sampe at the previous, before data and after I execute the SP.

    Thank you

  • unas_sasing - Sunday, October 29, 2017 9:14 PM

    Jeff Moden - Friday, October 27, 2017 6:47 AM

    The way you're going about it will require constant changes to the stored procedure each month.  Further and based on the number of months that you look like you're trying to delete on the initial run, you could be setting yourself up for a logfile and backup explosion.  The problem is that we can't tell with the information provided because it just does appear to match your description of what to delete.

    We need to know the following...
    1.  Is the name of the table you want to delete from actually "dbo.DB_DATE"??? I have my doubt there.  That seems like it would be a Calendar table of sorts so please confirm what the name of the table is that you want to delete from.
    2.  You also have the rule that for rows "Over 6 months" in age, you want to "Keep only the last day of the record (ex: 30 Apr 2017, 31 March 2017 ,etc".  You haven't identified how to identify "the record" to keep and we can't tell because it looks like you're deleting from a Calendar table.  Further, are the multiple accounts (or whatever) per month that you want to keep "the last record" for?

    As a bit of a side bar and depending on the content and purpose of the actual table you're trying to delete from, I thing this whole thing might be a mistake.  You're deleting a hell of a lot of history.  If it's transactional history for customers, you may be in violation of state or other laws.  It may be that instead of deleting data, you should be safely archiving the data.

    Anyway, please provide the info for the two question I asked so we can help you better because the code you provided isn't doing much for us. to help.

    Hai Jeff,

    1. I'm not delete the real actually "dbo.DB_DATE" 
     but the Dummy ( I Create the Dummy based on the Real One)

    2. I already give the sampe at the previous, before data and after I execute the SP.

    Thank you

    You're only providing pieces.  Please post the stored procedure and the table definition (ie. the CREATE TABLE statement including any indexes or keys).

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Monday, October 30, 2017 8:28 AM

    unas_sasing - Sunday, October 29, 2017 9:14 PM

    Jeff Moden - Friday, October 27, 2017 6:47 AM

    The way you're going about it will require constant changes to the stored procedure each month.  Further and based on the number of months that you look like you're trying to delete on the initial run, you could be setting yourself up for a logfile and backup explosion.  The problem is that we can't tell with the information provided because it just does appear to match your description of what to delete.

    We need to know the following...
    1.  Is the name of the table you want to delete from actually "dbo.DB_DATE"??? I have my doubt there.  That seems like it would be a Calendar table of sorts so please confirm what the name of the table is that you want to delete from.
    2.  You also have the rule that for rows "Over 6 months" in age, you want to "Keep only the last day of the record (ex: 30 Apr 2017, 31 March 2017 ,etc".  You haven't identified how to identify "the record" to keep and we can't tell because it looks like you're deleting from a Calendar table.  Further, are the multiple accounts (or whatever) per month that you want to keep "the last record" for?

    As a bit of a side bar and depending on the content and purpose of the actual table you're trying to delete from, I thing this whole thing might be a mistake.  You're deleting a hell of a lot of history.  If it's transactional history for customers, you may be in violation of state or other laws.  It may be that instead of deleting data, you should be safely archiving the data.

    Anyway, please provide the info for the two question I asked so we can help you better because the code you provided isn't doing much for us. to help.

    Hai Jeff,

    1. I'm not delete the real actually "dbo.DB_DATE" 
     but the Dummy ( I Create the Dummy based on the Real One)

    2. I already give the sampe at the previous, before data and after I execute the SP.

    Thank you

    You're only providing pieces.  Please post the stored procedure and the table definition (ie. the CREATE TABLE statement including any indexes or keys).

    Hi Jeff,

    step 1. I create DB_Datedummy

    select datekey,yearnumber,monthnumberofyear,monthnameofyear,monthcode,daynumberofmonthcalendar,daynumberofmonthbusiness,daynameofweek
    INTO dbo.DB_DATEDummy ---Dummydate
    --select *
    FROM DWIM.DWIM_T.DB_DATE

    This is the result of the Dummydate:

    select datekey
    --select *
    from dbo.DB_DATEDummy
    ORDER BY monthcode ASC

    datekey    yearnumber    monthnumberofyear    monthnameofyear    monthcode    daynumberofmonthcalendar    daynumberofmonthbusiness    daynameofweek
    2015-01-01 00:00:00    2015    1    January    201501    1    0    Thursday
    2015-01-02 00:00:00    2015    1    January    201501    2    1    Friday
    2015-01-03 00:00:00    2015    1    January    201501    3    0    Saturday
    2015-01-04 00:00:00    2015    1    January    201501    4    0    Sunday
    2015-01-05 00:00:00    2015    1    January    201501    5    2    Monday
    2015-01-06 00:00:00    2015    1    January    201501    6    3    Tuesday
    2015-01-07 00:00:00    2015    1    January    201501    7    4    Wednesday
    2015-01-08 00:00:00    2015    1    January    201501    8    5    Thursday
    2015-01-09 00:00:00    2015    1    January    201501    9    6    Friday
    2015-01-10 00:00:00    2015    1    January    201501    10    0    Saturday
    2015-01-11 00:00:00    2015    1    January    201501    11    0    Sunday
    2015-01-12 00:00:00    2015    1    January    201501    12    7    Monday
    2015-01-13 00:00:00    2015    1    January    201501    13    8    Tuesday
    2015-01-14 00:00:00    2015    1    January    201501    14    9    Wednesday
    2015-01-15 00:00:00    2015    1    January    201501    15    10    Thursday
    2015-01-16 00:00:00    2015    1    January    201501    16    11    Friday
    2015-01-17 00:00:00    2015    1    January    201501    17    0    Saturday
    2015-01-18 00:00:00    2015    1    January    201501    18    0    Sunday
    2015-01-19 00:00:00    2015    1    January    201501    19    12    Monday
    2015-01-20 00:00:00    2015    1    January    201501    20    13    Tuesday
    2015-01-21 00:00:00    2015    1    January    201501    21    14    Wednesday
    2015-01-22 00:00:00    2015    1    January    201501    22    15    Thursday
    2015-01-23 00:00:00    2015    1    January    201501    23    16    Friday
    2015-01-24 00:00:00    2015    1    January    201501    24    0    Saturday
    2015-01-25 00:00:00    2015    1    January    201501    25    0    Sunday
    2015-01-26 00:00:00    2015    1    January    201501    26    17    Monday
    2015-01-27 00:00:00    2015    1    January    201501    27    18    Tuesday
    2015-01-28 00:00:00    2015    1    January    201501    28    19    Wednesday
    2015-01-29 00:00:00    2015    1    January    201501    29    20    Thursday
    2015-01-30 00:00:00    2015    1    January    201501    30    21    Friday
    2015-01-31 00:00:00    2015    1    January    201501    31    22    Saturday
    2015-02-01 00:00:00    2015    2    February    201502    1    0    Sunday
    2015-02-02 00:00:00    2015    2    February    201502    2    1    Monday
    2015-02-03 00:00:00    2015    2    February    201502    3    2    Tuesday
    2015-02-04 00:00:00    2015    2    February    201502    4    3    Wednesday
    2015-02-05 00:00:00    2015    2    February    201502    5    4    Thursday
    2015-02-06 00:00:00    2015    2    February    201502    6    5    Friday
    2015-02-07 00:00:00    2015    2    February    201502    7    0    Saturday
    2015-02-08 00:00:00    2015    2    February    201502    8    0    Sunday
    2015-02-09 00:00:00    2015    2    February    201502    9    6    Monday
    2015-02-10 00:00:00    2015    2    February    201502    10    7    Tuesday
    2015-02-11 00:00:00    2015    2    February    201502    11    8    Wednesday
    2015-02-12 00:00:00    2015    2    February    201502    12    9    Thursday
    2015-02-13 00:00:00    2015    2    February    201502    13    10    Friday
    2015-02-14 00:00:00    2015    2    February    201502    14    0    Saturday
    2015-02-15 00:00:00    2015    2    February    201502    15    0    Sunday
    2015-02-16 00:00:00    2015    2    February    201502    16    11    Monday
    2015-02-17 00:00:00    2015    2    February    201502    17    12    Tuesday
    2015-02-18 00:00:00    2015    2    February    201502    18    13    Wednesday
    2015-02-19 00:00:00    2015    2    February    201502    19    0    Thursday
    2015-02-20 00:00:00    2015    2    February    201502    20    14    Friday
    2015-02-21 00:00:00    2015    2    February    201502    21    0    Saturday
    2015-02-22 00:00:00    2015    2    February    201502    22    0    Sunday
    2015-02-23 00:00:00    2015    2    February    201502    23    15    Monday
    2015-02-24 00:00:00    2015    2    February    201502    24    16    Tuesday
    2015-02-25 00:00:00    2015    2    February    201502    25    17    Wednesday
    2015-02-26 00:00:00    2015    2    February    201502    26    18    Thursday
    2015-02-27 00:00:00    2015    2    February    201502    27    19    Friday
    2015-02-28 00:00:00    2015    2    February    201502    28    20    Saturday
    2015-03-01 00:00:00    2015    3    March    201503    1    0    Sunday
    2015-03-02 00:00:00    2015    3    March    201503    2    1    Monday
    2015-03-03 00:00:00    2015    3    March    201503    3    2    Tuesday
    2015-03-04 00:00:00    2015    3    March    201503    4    3    Wednesday
    2015-03-05 00:00:00    2015    3    March    201503    5    4    Thursday
    2015-03-06 00:00:00    2015    3    March    201503    6    5    Friday
    2015-03-07 00:00:00    2015    3    March    201503    7    0    Saturday
    2015-03-08 00:00:00    2015    3    March    201503    8    0    Sunday
    2015-03-09 00:00:00    2015    3    March    201503    9    6    Monday
    2015-03-10 00:00:00    2015    3    March    201503    10    7    Tuesday
    2015-03-11 00:00:00    2015    3    March    201503    11    8    Wednesday
    2015-03-12 00:00:00    2015    3    March    201503    12    9    Thursday
    2015-03-13 00:00:00    2015    3    March    201503    13    10    Friday
    2015-03-14 00:00:00    2015    3    March    201503    14    0    Saturday
    2015-03-15 00:00:00    2015    3    March    201503    15    0    Sunday
    2015-03-16 00:00:00    2015    3    March    201503    16    11    Monday
    2015-03-17 00:00:00    2015    3    March    201503    17    12    Tuesday
    2015-03-18 00:00:00    2015    3    March    201503    18    13    Wednesday
    2015-03-19 00:00:00    2015    3    March    201503    19    14    Thursday
    2015-03-20 00:00:00    2015    3    March    201503    20    15    Friday
    2015-03-21 00:00:00    2015    3    March    201503    21    0    Saturday
    2015-03-22 00:00:00    2015    3    March    201503    22    0    Sunday
    2015-03-23 00:00:00    2015    3    March    201503    23    16    Monday
    2015-03-24 00:00:00    2015    3    March    201503    24    17    Tuesday
    2015-03-25 00:00:00    2015    3    March    201503    25    18    Wednesday
    2015-03-26 00:00:00    2015    3    March    201503    26    19    Thursday
    2015-03-27 00:00:00    2015    3    March    201503    27    20    Friday
    2015-03-28 00:00:00    2015    3    March    201503    28    0    Saturday
    2015-03-29 00:00:00    2015    3    March    201503    29    0    Sunday
    2015-03-30 00:00:00    2015    3    March    201503    30    21    Monday
    2015-03-31 00:00:00    2015    3    March    201503    31    22    Tuesday
    2015-04-01 00:00:00    2015    4    April    201504    1    1    Wednesday
    2015-04-02 00:00:00    2015    4    April    201504    2    2    Thursday
    2015-04-03 00:00:00    2015    4    April    201504    3    0    Friday
    2015-04-04 00:00:00    2015    4    April    201504    4    0    Saturday
    2015-04-05 00:00:00    2015    4    April    201504    5    0    Sunday
    2015-04-06 00:00:00    2015    4    April    201504    6    3    Monday
    2015-04-07 00:00:00    2015    4    April    201504    7    4    Tuesday
    2015-04-08 00:00:00    2015    4    April    201504    8    5    Wednesday
    2015-04-09 00:00:00    2015    4    April    201504    9    6    Thursday
    2015-04-10 00:00:00    2015    4    April    201504    10    7    Friday
    2015-04-11 00:00:00    2015    4    April    201504    11    0    Saturday
    2015-04-12 00:00:00    2015    4    April    201504    12    0    Sunday
    2015-04-13 00:00:00    2015    4    April    201504    13    8    Monday
    2015-04-14 00:00:00    2015    4    April    201504    14    9    Tuesday
    2015-04-15 00:00:00    2015    4    April    201504    15    10    Wednesday
    2015-04-16 00:00:00    2015    4    April    201504    16    11    Thursday
    2015-04-17 00:00:00    2015    4    April    201504    17    12    Friday
    2015-04-18 00:00:00    2015    4    April    201504    18    0    Saturday
    2015-04-19 00:00:00    2015    4    April    201504    19    0    Sunday
    2015-04-20 00:00:00    2015    4    April    201504    20    13    Monday
    2015-04-21 00:00:00    2015    4    April    201504    21    14    Tuesday
    2015-04-22 00:00:00    2015    4    April    201504    22    15    Wednesday
    2015-04-23 00:00:00    2015    4    April    201504    23    16    Thursday
    2015-04-24 00:00:00    2015    4    April    201504    24    17    Friday
    2015-04-25 00:00:00    2015    4    April    201504    25    0    Saturday
    2015-04-26 00:00:00    2015    4    April    201504    26    0    Sunday
    2015-04-27 00:00:00    2015    4    April    201504    27    18    Monday
    2015-04-28 00:00:00    2015    4    April    201504    28    19    Tuesday
    2015-04-29 00:00:00    2015    4    April    201504    29    20    Wednesday
    2015-04-30 00:00:00    2015    4    April    201504    30    21    Thursday
    2015-05-01 00:00:00    2015    5    May    201505    1    1    Friday
    2015-05-02 00:00:00    2015    5    May    201505    2    0    Saturday
    2015-05-03 00:00:00    2015    5    May    201505    3    0    Sunday
    2015-05-04 00:00:00    2015    5    May    201505    4    2    Monday
    2015-05-05 00:00:00    2015    5    May    201505    5    3    Tuesday
    2015-05-06 00:00:00    2015    5    May    201505    6    4    Wednesday
    2015-05-07 00:00:00    2015    5    May    201505    7    5    Thursday
    2015-05-08 00:00:00    2015    5    May    201505    8    6    Friday
    2015-05-09 00:00:00    2015    5    May    201505    9    0    Saturday
    2015-05-10 00:00:00    2015    5    May    201505    10    0    Sunday
    2015-05-11 00:00:00    2015    5    May    201505    11    7    Monday
    2015-05-12 00:00:00    2015    5    May    201505    12    8    Tuesday
    2015-05-13 00:00:00    2015    5    May    201505    13    9    Wednesday
    2015-05-14 00:00:00    2015    5    May    201505    14    0    Thursday
    2015-05-15 00:00:00    2015    5    May    201505    15    10    Friday
    2015-05-16 00:00:00    2015    5    May    201505    16    0    Saturday
    2015-05-17 00:00:00    2015    5    May    201505    17    0    Sunday
    2015-05-18 00:00:00    2015    5    May    201505    18    11    Monday
    2015-05-19 00:00:00    2015    5    May    201505    19    12    Tuesday
    2015-05-20 00:00:00    2015    5    May    201505    20    13    Wednesday
    2015-05-21 00:00:00    2015    5    May    201505    21    14    Thursday
    2015-05-22 00:00:00    2015    5    May    201505    22    15    Friday
    2015-05-23 00:00:00    2015    5    May    201505    23    0    Saturday
    2015-05-24 00:00:00    2015    5    May    201505    24    0    Sunday
    2015-05-25 00:00:00    2015    5    May    201505    25    16    Monday
    2015-05-26 00:00:00    2015    5    May    201505    26    17    Tuesday
    2015-05-27 00:00:00    2015    5    May    201505    27    18    Wednesday
    2015-05-28 00:00:00    2015    5    May    201505    28    19    Thursday
    2015-05-29 00:00:00    2015    5    May    201505    29    20    Friday
    2015-05-30 00:00:00    2015    5    May    201505    30    0    Saturday
    2015-05-31 00:00:00    2015    5    May    201505    31    0    Sunday
    2015-06-01 00:00:00    2015    6    June    201506    1    1    Monday
    2015-06-02 00:00:00    2015    6    June    201506    2    0    Tuesday
    2015-06-03 00:00:00    2015    6    June    201506    3    2    Wednesday
    2015-06-04 00:00:00    2015    6    June    201506    4    3    Thursday
    2015-06-05 00:00:00    2015    6    June    201506    5    4    Friday
    2015-06-06 00:00:00    2015    6    June    201506    6    0    Saturday
    2015-06-07 00:00:00    2015    6    June    201506    7    0    Sunday
    2015-06-08 00:00:00    2015    6    June    201506    8    5    Monday
    2015-06-09 00:00:00    2015    6    June    201506    9    6    Tuesday
    2015-06-10 00:00:00    2015    6    June    201506    10    7    Wednesday
    2015-06-11 00:00:00    2015    6    June    201506    11    8    Thursday
    2015-06-12 00:00:00    2015    6    June    201506    12    9    Friday
    2015-06-13 00:00:00    2015    6    June    201506    13    0    Saturday
    2015-06-14 00:00:00    2015    6    June    201506    14    0    Sunday
    2015-06-15 00:00:00    2015    6    June    201506    15    10    Monday
    2015-06-16 00:00:00    2015    6    June    201506    16    11    Tuesday
    2015-06-17 00:00:00    2015    6    June    201506    17    12    Wednesday
    2015-06-18 00:00:00    2015    6    June    201506    18    13    Thursday
    2015-06-19 00:00:00    2015    6    June    201506    19    14    Friday
    2015-06-20 00:00:00    2015    6    June    201506    20    0    Saturday
    2015-06-21 00:00:00    2015    6    June    201506    21    0    Sunday
    2015-06-22 00:00:00    2015    6    June    201506    22    15    Monday
    2015-06-23 00:00:00    2015    6    June    201506    23    16    Tuesday
    2015-06-24 00:00:00    2015    6    June    201506    24    17    Wednesday
    2015-06-25 00:00:00    2015    6    June    201506    25    18    Thursday
    2015-06-26 00:00:00    2015    6    June    201506    26    19    Friday
    2015-06-27 00:00:00    2015    6    June    201506    27    0    Saturday
    2015-06-28 00:00:00    2015    6    June    201506    28    0    Sunday
    2015-06-29 00:00:00    2015    6    June    201506    29    20    Monday
    2015-06-30 00:00:00    2015    6    June    201506    30    21    Tuesday
    2015-07-01 00:00:00    2015    7    July    201507    1    1    Wednesday
    2015-07-02 00:00:00    2015    7    July    201507    2    2    Thursday
    2015-07-03 00:00:00    2015    7    July    201507    3    3    Friday
    2015-07-04 00:00:00    2015    7    July    201507    4    0    Saturday
    2015-07-05 00:00:00    2015    7    July    201507    5    0    Sunday
    2015-07-06 00:00:00    2015    7    July    201507    6    4    Monday
    2015-07-07 00:00:00    2015    7    July    201507    7    5    Tuesday
    2015-07-08 00:00:00    2015    7    July    201507    8    6    Wednesday
    2015-07-09 00:00:00    2015    7    July    201507    9    7    Thursday
    2015-07-10 00:00:00    2015    7    July    201507    10    8    Friday
    2015-07-11 00:00:00    2015    7    July    201507    11    0    Saturday
    2015-07-12 00:00:00    2015    7    July    201507    12    0    Sunday
    2015-07-13 00:00:00    2015    7    July    201507    13    9    Monday
    2015-07-14 00:00:00    2015    7    July    201507    14    10    Tuesday
    2015-07-15 00:00:00    2015    7    July    201507    15    11    Wednesday
    2015-07-16 00:00:00    2015    7    July    201507    16    0    Thursday
    2015-07-17 00:00:00    2015    7    July    201507    17    0    Friday
    2015-07-18 00:00:00    2015    7    July    201507    18    0    Saturday
    2015-07-19 00:00:00    2015    7    July    201507    19    0    Sunday
    2015-07-20 00:00:00    2015    7    July    201507    20    0    Monday
    2015-07-21 00:00:00    2015    7    July    201507    21    12    Tuesday
    2015-07-22 00:00:00    2015    7    July    201507    22    13    Wednesday
    2015-07-23 00:00:00    2015    7    July    201507    23    14    Thursday
    2015-07-24 00:00:00    2015    7    July    201507    24    15    Friday
    2015-07-25 00:00:00    2015    7    July    201507    25    0    Saturday
    2015-07-26 00:00:00    2015    7    July    201507    26    0    Sunday
    2015-07-27 00:00:00    2015    7    July    201507    27    16    Monday
    2015-07-28 00:00:00    2015    7    July    201507    28    17    Tuesday
    2015-07-29 00:00:00    2015    7    July    201507    29    18    Wednesday
    2015-07-30 00:00:00    2015    7    July    201507    30    19    Thursday
    2015-07-31 00:00:00    2015    7    July    201507    31    20    Friday
    2015-08-01 00:00:00    2015    8    August    201508    1    0    Saturday
    2015-08-02 00:00:00    2015    8    August    201508    2    0    Sunday
    2015-08-03 00:00:00    2015    8    August    201508    3    1    Monday
    2015-08-04 00:00:00    2015    8    August    201508    4    2    Tuesday
    2015-08-05 00:00:00    2015    8    August    201508    5    3    Wednesday
    2015-08-06 00:00:00    2015    8    August    201508    6    4    Thursday
    2015-08-07 00:00:00    2015    8    August    201508    7    5    Friday
    2015-08-08 00:00:00    2015    8    August    201508    8    0    Saturday
    2015-08-09 00:00:00    2015    8    August    201508    9    0    Sunday
    2015-08-10 00:00:00    2015    8    August    201508    10    6    Monday
    2015-08-11 00:00:00    2015    8    August    201508    11    7    Tuesday
    2015-08-12 00:00:00    2015    8    August    201508    12    8    Wednesday
    2015-08-13 00:00:00    2015    8    August    201508    13    9    Thursday
    2015-08-14 00:00:00    2015    8    August    201508    14    10    Friday
    2015-08-15 00:00:00    2015    8    August    201508    15    0    Saturday
    2015-08-16 00:00:00    2015    8    August    201508    16    0    Sunday
    2015-08-17 00:00:00    2015    8    August    201508    17    0    Monday
    2015-08-18 00:00:00    2015    8    August    201508    18    11    Tuesday
    2015-08-19 00:00:00    2015    8    August    201508    19    12    Wednesday
    2015-08-20 00:00:00    2015    8    August    201508    20    13    Thursday
    2015-08-21 00:00:00    2015    8    August    201508    21    14    Friday
    2015-08-22 00:00:00    2015    8    August    201508    22    0    Saturday
    2015-08-23 00:00:00    2015    8    August    201508    23    0    Sunday
    2015-08-24 00:00:00    2015    8    August    201508    24    15    Monday
    2015-08-25 00:00:00    2015    8    August    201508    25    16    Tuesday
    2015-08-26 00:00:00    2015    8    August    201508    26    17    Wednesday
    2015-08-27 00:00:00    2015    8    August    201508    27    18    Thursday
    2015-08-28 00:00:00    2015    8    August    201508    28    19    Friday
    2015-08-29 00:00:00    2015    8    August    201508    29    0    Saturday
    2015-08-30 00:00:00    2015    8    August    201508    30    0    Sunday
    2015-08-31 00:00:00    2015    8    August    201508    31    20    Monday
    2015-09-01 00:00:00    2015    9    September    201509    1    1    Tuesday
    2015-09-02 00:00:00    2015    9    September    201509    2    2    Wednesday
    2015-09-03 00:00:00    2015    9    September    201509    3    3    Thursday
    2015-09-04 00:00:00    2015    9    September    201509    4    4    Friday
    2015-09-05 00:00:00    2015    9    September    201509    5    0    Saturday
    2015-09-06 00:00:00    2015    9    September    201509    6    0    Sunday
    2015-09-07 00:00:00    2015    9    September    201509    7    5    Monday
    2015-09-08 00:00:00    2015    9    September    201509    8    6    Tuesday
    2015-09-09 00:00:00    2015    9    September    201509    9    7    Wednesday
    2015-09-10 00:00:00    2015    9    September    201509    10    8    Thursday
    2015-09-11 00:00:00    2015    9    September    201509    11    9    Friday
    2015-09-12 00:00:00    2015    9    September    201509    12    0    Saturday
    2015-09-13 00:00:00    2015    9    September    201509    13    0    Sunday
    2015-09-14 00:00:00    2015    9    September    201509    14    10    Monday
    2015-09-15 00:00:00    2015    9    September    201509    15    11    Tuesday
    2015-09-16 00:00:00    2015    9    September    201509    16    12    Wednesday
    2015-09-17 00:00:00    2015    9    September    201509    17    13    Thursday
    2015-09-18 00:00:00    2015    9    September    201509    18    14    Friday
    2015-09-19 00:00:00    2015    9    September    201509    19    0    Saturday
    2015-09-20 00:00:00    2015    9    September    201509    20    0    Sunday
    2015-09-21 00:00:00    2015    9    September    201509    21    15    Monday
    2015-09-22 00:00:00    2015    9    September    201509    22    16    Tuesday
    2015-09-23 00:00:00    2015    9    September    201509    23    17    Wednesday
    2015-09-24 00:00:00    2015    9    September    201509    24    0    Thursday
    2015-09-25 00:00:00    2015    9    September    201509    25    18    Friday
    2015-09-26 00:00:00    2015    9    September    201509    26    0    Saturday
    2015-09-27 00:00:00    2015    9    September    201509    27    0    Sunday
    2015-09-28 00:00:00    2015    9    September    201509    28    19    Monday
    2015-09-29 00:00:00    2015    9    September    201509    29    20    Tuesday
    2015-09-30 00:00:00    2015    9    September    201509    30    21    Wednesday
    2015-10-01 00:00:00    2015    10    October    201510    1    1    Thursday
    2015-10-02 00:00:00    2015    10    October    201510    2    2    Friday
    2015-10-03 00:00:00    2015    10    October    201510    3    0    Saturday
    2015-10-04 00:00:00    2015    10    October    201510    4    0    Sunday
    2015-10-05 00:00:00    2015    10    October    201510    5    3    Monday
    2015-10-06 00:00:00    2015    10    October    201510    6    4    Tuesday
    2015-10-07 00:00:00    2015    10    October    201510    7    5    Wednesday
    2015-10-08 00:00:00    2015    10    October    201510    8    6    Thursday
    2015-10-09 00:00:00    2015    10    October    201510    9    7    Friday
    2015-10-10 00:00:00    2015    10    October    201510    10    0    Saturday
    2015-10-11 00:00:00    2015    10    October    201510    11    0    Sunday
    2015-10-12 00:00:00    2015    10    October    201510    12    8    Monday
    2015-10-13 00:00:00    2015    10    October    201510    13    9    Tuesday
    2015-10-14 00:00:00    2015    10    October    201510    14    0    Wednesday
    2015-10-15 00:00:00    2015    10    October    201510    15    10    Thursday
    2015-10-16 00:00:00    2015    10    October    201510    16    11    Friday
    2015-10-17 00:00:00    2015    10    October    201510    17    0    Saturday
    2015-10-18 00:00:00    2015    10    October    201510    18    0    Sunday
    2015-10-19 00:00:00    2015    10    October    201510    19    12    Monday
    2015-10-20 00:00:00    2015    10    October    201510    20    13    Tuesday
    2015-10-21 00:00:00    2015    10    October    201510    21    14    Wednesday
    2015-10-22 00:00:00    2015    10    October    201510    22    15    Thursday
    2015-10-23 00:00:00    2015    10    October    201510    23    16    Friday
    2015-10-24 00:00:00    2015    10    October    201510    24    0    Saturday
    2015-10-25 00:00:00    2015    10    October    201510    25    0    Sunday
    2015-10-26 00:00:00    2015    10    October    201510    26    17    Monday
    2015-10-27 00:00:00    2015    10    October    201510    27    18    Tuesday
    2015-10-28 00:00:00    2015    10    October    201510    28    19    Wednesday
    2015-10-29 00:00:00    2015    10    October    201510    29    20    Thursday
    2015-10-30 00:00:00    2015    10    October    201510    30    21    Friday
    2015-10-31 00:00:00    2015    10    October    201510    31    0    Saturday
    2015-11-01 00:00:00    2015    11    November    201511    1    0    Sunday
    2015-11-02 00:00:00    2015    11    November    201511    2    1    Monday
    2015-11-03 00:00:00    2015    11    November    201511    3    2    Tuesday
    2015-11-04 00:00:00    2015    11    November    201511    4    3    Wednesday
    2015-11-05 00:00:00    2015    11    November    201511    5    4    Thursday
    2015-11-06 00:00:00    2015    11    November    201511    6    5    Friday
    2015-11-07 00:00:00    2015    11    November    201511    7    0    Saturday
    2015-11-08 00:00:00    2015    11    November    201511    8    0    Sunday
    2015-11-09 00:00:00    2015    11    November    201511    9    6    Monday
    2015-11-10 00:00:00    2015    11    November    201511    10    7    Tuesday
    2015-11-11 00:00:00    2015    11    November    201511    11    8    Wednesday
    2015-11-12 00:00:00    2015    11    November    201511    12    9    Thursday
    2015-11-13 00:00:00    2015    11    November    201511    13    10    Friday
    2015-11-14 00:00:00    2015    11    November    201511    14    0    Saturday
    2015-11-15 00:00:00    2015    11    November    201511    15    0    Sunday
    2015-11-16 00:00:00    2015    11    November    201511    16    11    Monday
    2015-11-17 00:00:00    2015    11    November    201511    17    12    Tuesday
    2015-11-18 00:00:00    2015    11    November    201511    18    13    Wednesday
    2015-11-19 00:00:00    2015    11    November    201511    19    14    Thursday
    2015-11-20 00:00:00    2015    11    November    201511    20    15    Friday
    2015-11-21 00:00:00    2015    11    November    201511    21    0    Saturday
    2015-11-22 00:00:00    2015    11    November    201511    22    0    Sunday
    2015-11-23 00:00:00    2015    11    November    201511    23    16    Monday
    2015-11-24 00:00:00    2015    11    November    201511    24    17    Tuesday
    2015-11-25 00:00:00    2015    11    November    201511    25    18    Wednesday
    2015-11-26 00:00:00    2015    11    November    201511    26    19    Thursday
    2015-11-27 00:00:00    2015    11    November    201511    27    20    Friday
    2015-11-28 00:00:00    2015    11    November    201511    28    0    Saturday
    2015-11-29 00:00:00    2015    11    November    201511    29    0    Sunday
    2015-11-30 00:00:00    2015    11    November    201511    30    21    Monday
    2015-12-01 00:00:00    2015    12    December    201512    1    1    Tuesday
    2015-12-02 00:00:00    2015    12    December    201512    2    2    Wednesday
    2015-12-03 00:00:00    2015    12    December    201512    3    3    Thursday
    2015-12-04 00:00:00    2015    12    December    201512    4    4    Friday
    2015-12-05 00:00:00    2015    12    December    201512    5    0    Saturday
    2015-12-06 00:00:00    2015    12    December    201512    6    0    Sunday
    2015-12-07 00:00:00    2015    12    December    201512    7    5    Monday
    2015-12-08 00:00:00    2015    12    December    201512    8    6    Tuesday
    2015-12-09 00:00:00    2015    12    December    201512    9    0    Wednesday
    2015-12-10 00:00:00    2015    12    December    201512    10    7    Thursday
    2015-12-11 00:00:00    2015    12    December    201512    11    8    Friday
    2015-12-12 00:00:00    2015    12    December    201512    12    0    Saturday
    2015-12-13 00:00:00    2015    12    December    201512    13    0    Sunday
    2015-12-14 00:00:00    2015    12    December    201512    14    9    Monday
    2015-12-15 00:00:00    2015    12    December    201512    15    10    Tuesday
    2015-12-16 00:00:00    2015    12    December    201512    16    11    Wednesday
    2015-12-17 00:00:00    2015    12    December    201512    17    12    Thursday
    2015-12-18 00:00:00    2015    12    December    201512    18    13    Friday
    2015-12-19 00:00:00    2015    12    December    201512    19    0    Saturday
    2015-12-20 00:00:00    2015    12    December    201512    20    0    Sunday
    2015-12-21 00:00:00    2015    12    December    201512    21    14    Monday
    2015-12-22 00:00:00    2015    12    December    201512    22    15    Tuesday
    2015-12-23 00:00:00    2015    12    December    201512    23    16    Wednesday
    2015-12-24 00:00:00    2015    12    December    201512    24    0    Thursday
    2015-12-25 00:00:00    2015    12    December    201512    25    0    Friday
    2015-12-26 00:00:00    2015    12    December    201512    26    0    Saturday
    2015-12-27 00:00:00    2015    12    December    201512    27    0    Sunday
    2015-12-28 00:00:00    2015    12    December    201512    28    17    Monday
    2015-12-29 00:00:00    2015    12    December    201512    29    18    Tuesday
    2015-12-30 00:00:00    2015    12    December    201512    30    19    Wednesday
    2015-12-31 00:00:00    2015    12    December    201512    31    20    Thursday
    2016-01-01 00:00:00    2016    1    January    201601    1    0    Friday
    2016-01-02 00:00:00    2016    1    January    201601    2    0    Saturday
    2016-01-03 00:00:00    2016    1    January    201601    3    0    Sunday
    2016-01-04 00:00:00    2016    1    January    201601    4    1    Monday
    2016-01-05 00:00:00    2016    1    January    201601    5    2    Tuesday
    2016-01-06 00:00:00    2016    1    January    201601    6    3    Wednesday
    2016-01-07 00:00:00    2016    1    January    201601    7    4    Thursday
    2016-01-08 00:00:00    2016    1    January    201601    8    5    Friday
    2016-01-09 00:00:00    2016    1    January    201601    9    5    Saturday
    2016-01-10 00:00:00    2016    1    January    201601    10    5    Sunday
    2016-01-11 00:00:00    2016    1    January    201601    11    6    Monday
    2016-01-12 00:00:00    2016    1    January    201601    12    7    Tuesday
    2016-01-13 00:00:00    2016    1    January    201601    13    8    Wednesday
    2016-01-14 00:00:00    2016    1    January    201601    14    9    Thursday
    2016-01-15 00:00:00    2016    1    January    201601    15    10    Friday
    2016-01-16 00:00:00    2016    1    January    201601    16    10    Saturday
    2016-01-17 00:00:00    2016    1    January    201601    17    10    Sunday
    2016-01-18 00:00:00    2016    1    January    201601    18    11    Monday
    2016-01-19 00:00:00    2016    1    January    201601    19    12    Tuesday
    2016-01-20 00:00:00    2016    1    January    201601    20    13    Wednesday
    2016-01-21 00:00:00    2016    1    January    201601    21    14    Thursday
    2016-01-22 00:00:00    2016    1    January    201601    22    15    Friday
    2016-01-23 00:00:00    2016    1    January    201601    23    15    Saturday
    2016-01-24 00:00:00    2016    1    January    201601    24    15    Sunday
    2016-01-25 00:00:00    2016    1    January    201601    25    16    Monday
    2016-01-26 00:00:00    2016    1    January    201601    26    17    Tuesday
    2016-01-27 00:00:00    2016    1    January    201601    27    18    Wednesday
    2016-01-28 00:00:00    2016    1    January    201601    28    19    Thursday
    2016-01-29 00:00:00    2016    1    January    201601    29    20    Friday
    2016-01-30 00:00:00    2016    1    January    201601    30    20    Saturday
    2016-01-31 00:00:00    2016    1    January    201601    31    20    Sunday
    2016-02-01 00:00:00    2016    2    February    201602    1    1    Monday
    2016-02-02 00:00:00    2016    2    February    201602    2    2    Tuesday
    2016-02-03 00:00:00    2016    2    February    201602    3    3    Wednesday
    2016-02-04 00:00:00    2016    2    February    201602    4    4    Thursday
    2016-02-05 00:00:00    2016    2    February    201602    5    5    Friday
    2016-02-06 00:00:00    2016    2    February    201602    6    5    Saturday
    2016-02-07 00:00:00    2016    2    February    201602    7    5    Sunday
    2016-02-08 00:00:00    2016    2    February    201602    8    5    Monday
    2016-02-09 00:00:00    2016    2    February    201602    9    6    Tuesday
    2016-02-10 00:00:00    2016    2    February    201602    10    7    Wednesday
    2016-02-11 00:00:00    2016    2    February    201602    11    8    Thursday
    2016-02-12 00:00:00    2016    2    February    201602    12    9    Friday
    2016-02-13 00:00:00    2016    2    February    201602    13    9    Saturday
    2016-02-14 00:00:00    2016    2    February    201602    14    9    Sunday
    2016-02-15 00:00:00    2016    2    February    201602    15    10    Monday
    2016-02-16 00:00:00    2016    2    February    201602    16    11    Tuesday
    2016-02-17 00:00:00    2016    2    February    201602    17    12    Wednesday
    2016-02-18 00:00:00    2016    2    February    201602    18    13    Thursday
    2016-02-19 00:00:00    2016    2    February    201602    19    14    Friday
    2016-02-20 00:00:00    2016    2    February    201602    20    14    Saturday
    2016-02-21 00:00:00    2016    2    February    201602    21    14    Sunday
    2016-02-22 00:00:00    2016    2    February    201602    22    15    Monday
    2016-02-23 00:00:00    2016    2    February    201602    23    16    Tuesday
    2016-02-24 00:00:00    2016    2    February    201602    24    17    Wednesday
    2016-02-25 00:00:00    2016    2    February    201602    25    18    Thursday
    2016-02-26 00:00:00    2016    2    February    201602    26    19    Friday
    2016-02-27 00:00:00    2016    2    February    201602    27    19    Saturday
    2016-02-28 00:00:00    2016    2    February    201602    28    19    Sunday
    2016-02-29 00:00:00    2016    2    February    201602    29    20    Monday
    2016-03-01 00:00:00    2016    3    March    201603    1    1    Tuesday
    2016-03-02 00:00:00    2016    3    March    201603    2    2    Wednesday
    2016-03-03 00:00:00    2016    3    March    201603    3    3    Thursday
    2016-03-04 00:00:00    2016    3    March    201603    4    4    Friday
    2016-03-05 00:00:00    2016    3    March    201603    5    4    Saturday
    2016-03-06 00:00:00    2016    3    March    201603    6    4    Sunday
    2016-03-07 00:00:00    2016    3    March    201603    7    5    Monday
    2016-03-08 00:00:00    2016    3    March    201603    8    6    Tuesday
    2016-03-09 00:00:00    2016    3    March    201603    9    6    Wednesday
    2016-03-10 00:00:00    2016    3    March    201603    10    7    Thursday
    2016-03-11 00:00:00    2016    3    March    201603    11    8    Friday
    2016-03-12 00:00:00    2016    3    March    201603    12    8    Saturday
    2016-03-13 00:00:00    2016    3    March    201603    13    8    Sunday
    2016-03-14 00:00:00    2016    3    March    201603    14    9    Monday
    2016-03-15 00:00:00    2016    3    March    201603    15    10    Tuesday
    2016-03-16 00:00:00    2016    3    March    201603    16    11    Wednesday
    2016-03-17 00:00:00    2016    3    March    201603    17    12    Thursday
    2016-03-18 00:00:00    2016    3    March    201603    18    13    Friday
    2016-03-19 00:00:00    2016    3    March    201603    19    13    Saturday
    2016-03-20 00:00:00    2016    3    March    201603    20    13    Sunday
    2016-03-21 00:00:00    2016    3    March    201603    21    14    Monday
    2016-03-22 00:00:00    2016    3    March    201603    22    15    Tuesday
    2016-03-23 00:00:00    2016    3    March    201603    23    16    Wednesday
    2016-03-24 00:00:00    2016    3    March    201603    24    17    Thursday
    2016-03-25 00:00:00    2016    3    March    201603    25    17    Friday
    2016-03-26 00:00:00    2016    3    March    201603    26    17    Saturday
    2016-03-27 00:00:00    2016    3    March    201603    27    17    Sunday
    2016-03-28 00:00:00    2016    3    March    201603    28    18    Monday
    2016-03-29 00:00:00    2016    3    March    201603    29    19    Tuesday
    2016-03-30 00:00:00    2016    3    March    201603    30    20    Wednesday
    2016-03-31 00:00:00    2016    3    March    201603    31    21    Thursday
    2016-04-01 00:00:00    2016    4    April    201604    1    1    Friday
    2016-04-02 00:00:00    2016    4    April    201604    2    1    Saturday
    2016-04-03 00:00:00    2016    4    April    201604    3    1    Sunday
    2016-04-04 00:00:00    2016    4    April    201604    4    2    Monday
    2016-04-05 00:00:00    2016    4    April    201604    5    3    Tuesday
    2016-04-06 00:00:00    2016    4    April    201604    6    4    Wednesday
    2016-04-07 00:00:00    2016    4    April    201604    7    5    Thursday
    2016-04-08 00:00:00    2016    4    April    201604    8    6    Friday
    2016-04-09 00:00:00    2016    4    April    201604    9    6    Saturday
    2016-04-10 00:00:00    2016    4    April    201604    10    6    Sunday
    2016-04-11 00:00:00    2016    4    April    201604    11    7    Monday
    2016-04-12 00:00:00    2016    4    April    201604    12    8    Tuesday
    2016-04-13 00:00:00    2016    4    April    201604    13    9    Wednesday
    2016-04-14 00:00:00    2016    4    April    201604    14    10    Thursday
    2016-04-15 00:00:00    2016    4    April    201604    15    11    Friday
    2016-04-16 00:00:00    2016    4    April    201604    16    11    Saturday
    2016-04-17 00:00:00    2016    4    April    201604    17    11    Sunday
    2016-04-18 00:00:00    2016    4    April    201604    18    12    Monday
    2016-04-19 00:00:00    2016    4    April    201604    19    13    Tuesday
    2016-04-20 00:00:00    2016    4    April    201604    20    14    Wednesday
    2016-04-21 00:00:00    2016    4    April    201604    21    15    Thursday
    2016-04-22 00:00:00    2016    4    April    201604    22    16    Friday
    2016-04-23 00:00:00    2016    4    April    201604    23    16    Saturday
    2016-04-24 00:00:00    2016    4    April    201604    24    16    Sunday
    2016-04-25 00:00:00    2016    4    April    201604    25    17    Monday
    2016-04-26 00:00:00    2016    4    April    201604    26    18    Tuesday
    2016-04-27 00:00:00    2016    4    April    201604    27    19    Wednesday
    2016-04-28 00:00:00    2016    4    April    201604    28    20    Thursday
    2016-04-29 00:00:00    2016    4    April    201604    29    21    Friday
    2016-04-30 00:00:00    2016    4    April    201604    30    21    Saturday
    2016-05-01 00:00:00    2016    5    May    201605    1    0    Sunday
    2016-05-02 00:00:00    2016    5    May    201605    2    1    Monday
    2016-05-03 00:00:00    2016    5    May    201605    3    2    Tuesday
    2016-05-04 00:00:00    2016    5    May    201605    4    3    Wednesday
    2016-05-05 00:00:00    2016    5    May    201605    5    3    Thursday
    2016-05-06 00:00:00    2016    5    May    201605    6    3    Friday
    2016-05-07 00:00:00    2016    5    May    201605    7    3    Saturday
    2016-05-08 00:00:00    2016    5    May    201605    8    3    Sunday
    2016-05-09 00:00:00    2016    5    May    201605    9    4    Monday
    2016-05-10 00:00:00    2016    5    May    201605    10    5    Tuesday
    2016-05-11 00:00:00    2016    5    May    201605    11    6    Wednesday
    2016-05-12 00:00:00    2016    5    May    201605    12    7    Thursday
    2016-05-13 00:00:00    2016    5    May    201605    13    8    Friday
    2016-05-14 00:00:00    2016    5    May    201605    14    8    Saturday
    2016-05-15 00:00:00    2016    5    May    201605    15    8    Sunday
    2016-05-16 00:00:00    2016    5    May    201605    16    9    Monday
    2016-05-17 00:00:00    2016    5    May    201605    17    10    Tuesday
    2016-05-18 00:00:00    2016    5    May    201605    18    11    Wednesday
    2016-05-19 00:00:00    2016    5    May    201605    19    12    Thursday
    2016-05-20 00:00:00    2016    5    May    201605    20    13    Friday
    2016-05-21 00:00:00    2016    5    May    201605    21    13    Saturday
    2016-05-22 00:00:00    2016    5    May    201605    22    13    Sunday
    2016-05-23 00:00:00    2016    5    May    201605    23    14    Monday
    2016-05-24 00:00:00    2016    5    May    201605    24    15    Tuesday
    2016-05-25 00:00:00    2016    5    May    201605    25    16    Wednesday
    2016-05-26 00:00:00    2016    5    May    201605    26    17    Thursday
    2016-05-27 00:00:00    2016    5    May    201605    27    18    Friday
    2016-05-28 00:00:00    2016    5    May    201605    28    18    Saturday
    2016-05-29 00:00:00    2016    5    May    201605    29    18    Sunday
    2016-05-30 00:00:00    2016    5    May    201605    30    19    Monday
    2016-05-31 00:00:00    2016    5    May    201605    31    20    Tuesday
    2016-06-01 00:00:00    2016    6    June    201606    1    1    Wednesday
    2016-06-02 00:00:00    2016    6    June    201606    2    2    Thursday
    2016-06-03 00:00:00    2016    6    June    201606    3    3    Friday
    2016-06-04 00:00:00    2016    6    June    201606    4    3    Saturday
    2016-06-05 00:00:00    2016    6    June    201606    5    3    Sunday
    2016-06-06 00:00:00    2016    6    June    201606    6    4    Monday
    2016-06-07 00:00:00    2016    6    June    201606    7    5    Tuesday
    2016-06-08 00:00:00    2016    6    June    201606    8    6    Wednesday
    2016-06-09 00:00:00    2016    6    June    201606    9    7    Thursday
    2016-06-10 00:00:00    2016    6    June    201606    10    8    Friday
    2016-06-11 00:00:00    2016    6    June    201606    11    8    Saturday
    2016-06-12 00:00:00    2016    6    June    201606    12    8    Sunday
    2016-06-13 00:00:00    2016    6    June    201606    13    9    Monday
    2016-06-14 00:00:00    2016    6    June    201606    14    10    Tuesday
    2016-06-15 00:00:00    2016    6    June    201606    15    11    Wednesday
    2016-06-16 00:00:00    2016    6    June    201606    16    12    Thursday
    2016-06-17 00:00:00    2016    6    June    201606    17    13    Friday
    2016-06-18 00:00:00    2016    6    June    201606    18    13    Saturday
    2016-06-19 00:00:00    2016    6    June    201606    19    13    Sunday
    2016-06-20 00:00:00    2016    6    June    201606    20    14    Monday
    2016-06-21 00:00:00    2016    6    June    201606    21    15    Tuesday
    2016-06-22 00:00:00    2016    6    June    201606    22    16    Wednesday
    2016-06-23 00:00:00    2016    6    June    201606    23    17    Thursday
    2016-06-24 00:00:00    2016    6    June    201606    24    18    Friday
    2016-06-25 00:00:00    2016    6    June    201606    25    18    Saturday
    2016-06-26 00:00:00    2016    6    June    201606    26    18    Sunday
    2016-06-27 00:00:00    2016    6    June    201606    27    19    Monday
    2016-06-28 00:00:00    2016    6    June    201606    28    20    Tuesday
    2016-06-29 00:00:00    2016    6    June    201606    29    21    Wednesday
    2016-06-30 00:00:00    2016    6    June    201606    30    22    Thursday
    2016-07-01 00:00:00    2016    7    July    201607    1    1    Friday
    2016-07-02 00:00:00    2016    7    July    201607    2    1    Saturday
    2016-07-03 00:00:00    2016    7    July    201607    3    1    Sunday
    2016-07-04 00:00:00    2016    7    July    201607    4    2    Monday
    2016-07-05 00:00:00    2016    7    July    201607    5    2    Tuesday
    2016-07-06 00:00:00    2016    7    July    201607    6    2    Wednesday
    2016-07-07 00:00:00    2016    7    July    201607    7    2    Thursday
    2016-07-08 00:00:00    2016    7    July    201607    8    2    Friday
    2016-07-09 00:00:00    2016    7    July    201607    9    2    Saturday
    2016-07-10 00:00:00    2016    7    July    201607    10    2    Sunday
    2016-07-11 00:00:00    2016    7    July    201607    11    3    Monday
    2016-07-12 00:00:00    2016    7    July    201607    12    4    Tuesday
    2016-07-13 00:00:00    2016    7    July    201607    13    5    Wednesday
    2016-07-14 00:00:00    2016    7    July    201607    14    6    Thursday
    2016-07-15 00:00:00    2016    7    July    201607    15    7    Friday
    2016-07-16 00:00:00    2016    7    July    201607    16    7    Saturday
    2016-07-17 00:00:00    2016    7    July    201607    17    7    Sunday
    2016-07-18 00:00:00    2016    7    July    201607    18    8    Monday
    2016-07-19 00:00:00    2016    7    July    201607    19    9    Tuesday
    2016-07-20 00:00:00    2016    7    July    201607    20    10    Wednesday
    2016-07-21 00:00:00    2016    7    July    201607    21    11    Thursday
    2016-07-22 00:00:00    2016    7    July    201607    22    12    Friday
    2016-07-23 00:00:00    2016    7    July    201607    23    12    Saturday
    2016-07-24 00:00:00    2016    7    July    201607    24    12    Sunday
    2016-07-25 00:00:00    2016    7    July    201607    25    13    Monday
    2016-07-26 00:00:00    2016    7    July    201607    26    14    Tuesday
    2016-07-27 00:00:00    2016    7    July    201607    27    15    Wednesday
    2016-07-28 00:00:00    2016    7    July    201607    28    16    Thursday
    2016-07-29 00:00:00    2016    7    July    201607    29    17    Friday
    2016-07-30 00:00:00    2016    7    July    201607    30    17    Saturday
    2016-07-31 00:00:00    2016    7    July    201607    31    17    Sunday
    2016-08-01 00:00:00    2016    8    August    201608    1    1    Monday
    2016-08-02 00:00:00    2016    8    August    201608    2    2    Tuesday
    2016-08-03 00:00:00    2016    8    August    201608    3    3    Wednesday
    2016-08-04 00:00:00    2016    8    August    201608    4    4    Thursday
    2016-08-05 00:00:00    2016    8    August    201608    5    5    Friday
    2016-08-06 00:00:00    2016    8    August    201608    6    5    Saturday
    2016-08-07 00:00:00    2016    8    August    201608    7    5    Sunday
    2016-08-08 00:00:00    2016    8    August    201608    8    6    Monday
    2016-08-09 00:00:00    2016    8    August    201608    9    7    Tuesday
    2016-08-10 00:00:00    2016    8    August    201608    10    8    Wednesday
    2016-08-11 00:00:00    2016    8    August    201608    11    9    Thursday
    2016-08-12 00:00:00    2016    8    August    201608    12    10    Friday
    2016-08-13 00:00:00    2016    8    August    201608    13    10    Saturday
    2016-08-14 00:00:00    2016    8    August    201608    14    10    Sunday
    2016-08-15 00:00:00    2016    8    August    201608    15    11    Monday
    2016-08-16 00:00:00    2016    8    August    201608    16    12    Tuesday
    2016-08-17 00:00:00    2016    8    August    201608    17    12    Wednesday
    2016-08-18 00:00:00    2016    8    August    201608    18    13    Thursday
    2016-08-19 00:00:00    2016    8    August    201608    19    14    Friday
    2016-08-20 00:00:00    2016    8    August    201608    20    14    Saturday
    2016-08-21 00:00:00    2016    8    August    201608    21    14    Sunday
    2016-08-22 00:00:00    2016    8    August    201608    22    15    Monday
    2016-08-23 00:00:00    2016    8    August    201608    23    16    Tuesday
    2016-08-24 00:00:00    2016    8    August    201608    24    17    Wednesday
    2016-08-25 00:00:00    2016    8    August    201608    25    18    Thursday
    2016-08-26 00:00:00    2016    8    August    201608    26    19    Friday
    2016-08-27 00:00:00    2016    8    August    201608    27    19    Saturday
    2016-08-28 00:00:00    2016    8    August    201608    28    19    Sunday
    2016-08-29 00:00:00    2016    8    August    201608    29    20    Monday
    2016-08-30 00:00:00    2016    8    August    201608    30    21    Tuesday
    2016-08-31 00:00:00    2016    8    August    201608    31    22    Wednesday
    2016-09-01 00:00:00    2016    9    September    201609    1    1    Thursday
    2016-09-02 00:00:00    2016    9    September    201609    2    2    Friday
    2016-09-03 00:00:00    2016    9    September    201609    3    2    Saturday
    2016-09-04 00:00:00    2016    9    September    201609    4    2    Sunday
    2016-09-05 00:00:00    2016    9    September    201609    5    3    Monday
    2016-09-06 00:00:00    2016    9    September    201609    6    4    Tuesday
    2016-09-07 00:00:00    2016    9    September    201609    7    5    Wednesday
    2016-09-08 00:00:00    2016    9    September    201609    8    6    Thursday
    2016-09-09 00:00:00    2016    9    September    201609    9    7    Friday
    2016-09-10 00:00:00    2016    9    September    201609    10    7    Saturday
    2016-09-11 00:00:00    2016    9    September    201609    11    7    Sunday
    2016-09-12 00:00:00    2016    9    September    201609    12    7    Monday
    2016-09-13 00:00:00    2016    9    September    201609    13    8    Tuesday
    2016-09-14 00:00:00    2016    9    September    201609    14    9    Wednesday
    2016-09-15 00:00:00    2016    9    September    201609    15    10    Thursday
    2016-09-16 00:00:00    2016    9    September    201609    16    11    Friday
    2016-09-17 00:00:00    2016    9    September    201609    17    11    Saturday
    2016-09-18 00:00:00    2016    9    September    201609    18    11    Sunday
    2016-09-19 00:00:00    2016    9    September    201609    19    12    Monday
    2016-09-20 00:00:00    2016    9    September    201609    20    13    Tuesday
    2016-09-21 00:00:00    2016    9    September    201609    21    14    Wednesday
    2016-09-22 00:00:00    2016    9    September    201609    22    15    Thursday
    2016-09-23 00:00:00    2016    9    September    201609    23    16    Friday
    2016-09-24 00:00:00    2016    9    September    201609    24    16    Saturday
    2016-09-25 00:00:00    2016    9    September    201609    25    16    Sunday
    2016-09-26 00:00:00    2016    9    September    201609    26    17    Monday
    2016-09-27 00:00:00    2016    9    September    201609    27    18    Tuesday
    2016-09-28 00:00:00    2016    9    September    201609    28    19    Wednesday
    2016-09-29 00:00:00    2016    9    September    201609    29    20    Thursday
    2016-09-30 00:00:00    2016    9    September    201609    30    21    Friday
    2016-10-01 00:00:00    2016    10    October    201610    1    0    Saturday
    2016-10-02 00:00:00    2016    10    October    201610    2    0    Sunday
    2016-10-03 00:00:00    2016    10    October    201610    3    1    Monday
    2016-10-04 00:00:00    2016    10    October    201610    4    2    Tuesday
    2016-10-05 00:00:00    2016    10    October    201610    5    3    Wednesday
    2016-10-06 00:00:00    2016    10    October    201610    6    4    Thursday
    2016-10-07 00:00:00    2016    10    October    201610    7    5    Friday
    2016-10-08 00:00:00    2016    10    October    201610    8    5    Saturday
    2016-10-09 00:00:00    2016    10    October    201610    9    5    Sunday
    2016-10-10 00:00:00    2016    10    October    201610    10    6    Monday
    2016-10-11 00:00:00    2016    10    October    201610    11    7    Tuesday
    2016-10-12 00:00:00    2016    10    October    201610    12    8    Wednesday
    2016-10-13 00:00:00    2016    10    October    201610    13    9    Thursday
    2016-10-14 00:00:00    2016    10    October    201610    14    10    Friday
    2016-10-15 00:00:00    2016    10    October    201610    15    10    Saturday
    2016-10-16 00:00:00    2016    10    October    201610    16    10    Sunday
    2016-10-17 00:00:00    2016    10    October    201610    17    11    Monday
    2016-10-18 00:00:00    2016    10    October    201610    18    12    Tuesday
    2016-10-19 00:00:00    2016    10    October    201610    19    13    Wednesday
    2016-10-20 00:00:00    2016    10    October    201610    20    14    Thursday
    2016-10-21 00:00:00    2016    10    October    201610    21    15    Friday
    2016-10-22 00:00:00    2016    10    October    201610    22    15    Saturday
    2016-10-23 00:00:00    2016    10    October    201610    23    15    Sunday
    2016-10-24 00:00:00    2016    10    October    201610    24    16    Monday
    2016-10-25 00:00:00    2016    10    October    201610    25    17    Tuesday
    2016-10-26 00:00:00    2016    10    October    201610    26    18    Wednesday
    2016-10-27 00:00:00    2016    10    October    201610    27    19    Thursday
    2016-10-28 00:00:00    2016    10    October    201610    28    20    Friday
    2016-10-29 00:00:00    2016    10    October    201610    29    20    Saturday
    2016-10-30 00:00:00    2016    10    October    201610    30    20    Sunday
    2016-10-31 00:00:00    2016    10    October    201610    31    21    Monday
    2016-11-01 00:00:00    2016    11    November    201611    1    1    Tuesday
    2016-11-02 00:00:00    2016    11    November    201611    2    2    Wednesday
    2016-11-03 00:00:00    2016    11    November    201611    3    3    Thursday
    2016-11-04 00:00:00    2016    11    November    201611    4    4    Friday
    2016-11-05 00:00:00    2016    11    November    201611    5    4    Saturday
    2016-11-06 00:00:00    2016    11    November    201611    6    4    Sunday
    2016-11-07 00:00:00    2016    11    November    201611    7    5    Monday
    2016-11-08 00:00:00    2016    11    November    201611    8    6    Tuesday
    2016-11-09 00:00:00    2016    11    November    201611    9    7    Wednesday
    2016-11-10 00:00:00    2016    11    November    201611    10    8    Thursday
    2016-11-11 00:00:00    2016    11    November    201611    11    9    Friday
    2016-11-12 00:00:00    2016    11    November    201611    12    9    Saturday
    2016-11-13 00:00:00    2016    11    November    201611    13    9    Sunday
    2016-11-14 00:00:00    2016    11    November    201611    14    10    Monday
    2016-11-15 00:00:00    2016    11    November    201611    15    11    Tuesday
    2016-11-16 00:00:00    2016    11    November    201611    16    12    Wednesday
    2016-11-17 00:00:00    2016    11    November    201611    17    13    Thursday
    2016-11-18 00:00:00    2016    11    November    201611    18    14    Friday
    2016-11-19 00:00:00    2016    11    November    201611    19    14    Saturday
    2016-11-20 00:00:00    2016    11    November    201611    20    14    Sunday
    2016-11-21 00:00:00    2016    11    November    201611    21    15    Monday
    2016-11-22 00:00:00    2016    11    November    201611    22    16    Tuesday
    2016-11-23 00:00:00    2016    11    November    201611    23    17    Wednesday
    2016-11-24 00:00:00    2016    11    November    201611    24    18    Thursday
    2016-11-25 00:00:00    2016    11    November    201611    25    19    Friday
    2016-11-26 00:00:00    2016    11    November    201611    26    19    Saturday
    2016-11-27 00:00:00    2016    11    November    201611    27    19    Sunday
    2016-11-28 00:00:00    2016    11    November    201611    28    20    Monday
    2016-11-29 00:00:00    2016    11    November    201611    29    21    Tuesday
    2016-11-30 00:00:00    2016    11    November    201611    30    22    Wednesday
    2016-12-01 00:00:00    2016    12    December    201612    1    1    Thursday
    2016-12-02 00:00:00    2016    12    December    201612    2    2    Friday
    2016-12-03 00:00:00    2016    12    December    201612    3    2    Saturday
    2016-12-04 00:00:00    2016    12    December    201612    4    2    Sunday
    2016-12-05 00:00:00    2016    12    December    201612    5    3    Monday
    2016-12-06 00:00:00    2016    12    December    201612    6    4    Tuesday
    2016-12-07 00:00:00    2016    12    December    201612    7    5    Wednesday
    2016-12-08 00:00:00    2016    12    December    201612    8    6    Thursday
    2016-12-09 00:00:00    2016    12    December    201612    9    7    Friday
    2016-12-10 00:00:00    2016    12    December    201612    10    7    Saturday
    2016-12-11 00:00:00    2016    12    December    201612    11    7    Sunday
    2016-12-12 00:00:00    2016    12    December    201612    12    7    Monday
    2016-12-13 00:00:00    2016    12    December    201612    13    8    Tuesday
    2016-12-14 00:00:00    2016    12    December    201612    14    9    Wednesday
    2016-12-15 00:00:00    2016    12    December    201612    15    10    Thursday
    2016-12-16 00:00:00    2016    12    December    201612    16    11    Friday
    2016-12-17 00:00:00    2016    12    December    201612    17    11    Saturday
    2016-12-18 00:00:00    2016    12    December    201612    18    11    Sunday
    2016-12-19 00:00:00    2016    12    December    201612    19    12    Monday
    2016-12-20 00:00:00    2016    12    December    201612    20    13    Tuesday
    2016-12-21 00:00:00    2016    12    December    201612    21    14    Wednesday
    2016-12-22 00:00:00    2016    12    December    201612    22    15    Thursday
    2016-12-23 00:00:00    2016    12    December    201612    23    16    Friday
    2016-12-24 00:00:00    2016    12    December    201612    24    16    Saturday
    2016-12-25 00:00:00    2016    12    December    201612    25    16    Sunday
    2016-12-26 00:00:00    2016    12    December    201612    26    16    Monday
    2016-12-27 00:00:00    2016    12    December    201612    27    17    Tuesday
    2016-12-28 00:00:00    2016    12    December    201612    28    18    Wednesday
    2016-12-29 00:00:00    2016    12    December    201612    29    19    Thursday
    2016-12-30 00:00:00    2016    12    December    201612    30    20    Friday
    2016-12-31 00:00:00    2016    12    December    201612    31    21    Saturday
    2017-01-01 00:00:00    2017    1    January    201701    1    0    Sunday
    2017-01-02 00:00:00    2017    1    January    201701    2    0    Monday
    2017-01-03 00:00:00    2017    1    January    201701    3    1    Tuesday
    2017-01-04 00:00:00    2017    1    January    201701    4    2    Wednesday
    2017-01-05 00:00:00    2017    1    January    201701    5    3    Thursday
    2017-01-06 00:00:00    2017    1    January    201701    6    4    Friday
    2017-01-07 00:00:00    2017    1    January    201701    7    4    Saturday
    2017-01-08 00:00:00    2017    1    January    201701    8    4    Sunday
    2017-01-09 00:00:00    2017    1    January    201701    9    5    Monday
    2017-01-10 00:00:00    2017    1    January    201701    10    6    Tuesday
    2017-01-11 00:00:00    2017    1    January    201701    11    7    Wednesday
    2017-01-12 00:00:00    2017    1    January    201701    12    8    Thursday
    2017-01-13 00:00:00    2017    1    January    201701    13    9    Friday
    2017-01-14 00:00:00    2017    1    January    201701    14    9    Saturday
    2017-01-15 00:00:00    2017    1    January    201701    15    9    Sunday
    2017-01-16 00:00:00    2017    1    January    201701    16    10    Monday
    2017-01-17 00:00:00    2017    1    January    201701    17    11    Tuesday
    2017-01-18 00:00:00    2017    1    January    201701    18    12    Wednesday
    2017-01-19 00:00:00    2017    1    January    201701    19    13    Thursday
    2017-01-20 00:00:00    2017    1    January    201701    20    14    Friday
    2017-01-21 00:00:00    2017    1    January    201701    21    14    Saturday
    2017-01-22 00:00:00    2017    1    January    201701    22    14    Sunday
    2017-01-23 00:00:00    2017    1    January    201701    23    15    Monday
    2017-01-24 00:00:00    2017    1    January    201701    24    16    Tuesday
    2017-01-25 00:00:00    2017    1    January    201701    25    17    Wednesday
    2017-01-26 00:00:00    2017    1    January    201701    26    18    Thursday
    2017-01-27 00:00:00    2017    1    January    201701    27    19    Friday
    2017-01-28 00:00:00    2017    1    January    201701    28    19    Saturday
    2017-01-29 00:00:00    2017    1    January    201701    29    19    Sunday
    2017-01-30 00:00:00    2017    1    January    201701    30    20    Monday
    2017-01-31 00:00:00    2017    1    January    201701    31    21    Tuesday
    2017-02-01 00:00:00    2017    2    February    201702    1    1    Wednesday
    2017-02-02 00:00:00    2017    2    February    201702    2    2    Thursday
    2017-02-03 00:00:00    2017    2    February    201702    3    3    Friday
    2017-02-04 00:00:00    2017    2    February    201702    4    3    Saturday
    2017-02-05 00:00:00    2017    2    February    201702    5    3    Sunday
    2017-02-06 00:00:00    2017    2    February    201702    6    4    Monday
    2017-02-07 00:00:00    2017    2    February    201702    7    5    Tuesday
    2017-02-08 00:00:00    2017    2    February    201702    8    6    Wednesday
    2017-02-09 00:00:00    2017    2    February    201702    9    7    Thursday
    2017-02-10 00:00:00    2017    2    February    201702    10    8    Friday
    2017-02-11 00:00:00    2017    2    February    201702    11    8    Saturday
    2017-02-12 00:00:00    2017    2    February    201702    12    8    Sunday
    2017-02-13 00:00:00    2017    2    February    201702    13    9    Monday
    2017-02-14 00:00:00    2017    2    February    201702    14    10    Tuesday
    2017-02-15 00:00:00    2017    2    February    201702    15    10    Wednesday
    2017-02-16 00:00:00    2017    2    February    201702    16    11    Thursday
    2017-02-17 00:00:00    2017    2    February    201702    17    12    Friday
    2017-02-18 00:00:00    2017    2    February    201702    18    12    Saturday
    2017-02-19 00:00:00    2017    2    February    201702    19    12    Sunday
    2017-02-20 00:00:00    2017    2    February    201702    20    13    Monday
    2017-02-21 00:00:00    2017    2    February    201702    21    14    Tuesday
    2017-02-22 00:00:00    2017    2    February    201702    22    15    Wednesday
    2017-02-23 00:00:00    2017    2    February    201702    23    16    Thursday
    2017-02-24 00:00:00    2017    2    February    201702    24    17    Friday
    2017-02-25 00:00:00    2017    2    February    201702    25    17    Saturday
    2017-02-26 00:00:00    2017    2    February    201702    26    17    Sunday
    2017-02-27 00:00:00    2017    2    February    201702    27    18    Monday
    2017-02-28 00:00:00    2017    2    February    201702    28    19    Tuesday
    2017-03-01 00:00:00    2017    3    March    201703    1    1    Wednesday
    2017-03-02 00:00:00    2017    3    March    201703    2    2    Thursday
    2017-03-03 00:00:00    2017    3    March    201703    3    3    Friday
    2017-03-04 00:00:00    2017    3    March    201703    4    3    Saturday
    2017-03-05 00:00:00    2017    3    March    201703    5    3    Sunday
    2017-03-06 00:00:00    2017    3    March    201703    6    4    Monday
    2017-03-07 00:00:00    2017    3    March    201703    7    5    Tuesday
    2017-03-08 00:00:00    2017    3    March    201703    8    6    Wednesday
    2017-03-09 00:00:00    2017    3    March    201703    9    7    Thursday
    2017-03-10 00:00:00    2017    3    March    201703    10    8    Friday
    2017-03-11 00:00:00    2017    3    March    201703    11    8    Saturday
    2017-03-12 00:00:00    2017    3    March    201703    12    8    Sunday
    2017-03-13 00:00:00    2017    3    March    201703    13    9    Monday
    2017-03-14 00:00:00    2017    3    March    201703    14    10    Tuesday
    2017-03-15 00:00:00    2017    3    March    201703    15    11    Wednesday
    2017-03-16 00:00:00    2017    3    March    201703    16    12    Thursday
    2017-03-17 00:00:00    2017    3    March    201703    17    13    Friday
    2017-03-18 00:00:00    2017    3    March    201703    18    13    Saturday
    2017-03-19 00:00:00    2017    3    March    201703    19    13    Sunday
    2017-03-20 00:00:00    2017    3    March    201703    20    14    Monday
    2017-03-21 00:00:00    2017    3    March    201703    21    15    Tuesday
    2017-03-22 00:00:00    2017    3    March    201703    22    16    Wednesday
    2017-03-23 00:00:00    2017    3    March    201703    23    17    Thursday
    2017-03-24 00:00:00    2017    3    March    201703    24    18    Friday
    2017-03-25 00:00:00    2017    3    March    201703    25    18    Saturday
    2017-03-26 00:00:00    2017    3    March    201703    26    18    Sunday
    2017-03-27 00:00:00    2017    3    March    201703    27    19    Monday
    2017-03-28 00:00:00    2017    3    March    201703    28    19    Tuesday
    2017-03-29 00:00:00    2017    3    March    201703    29    20    Wednesday
    2017-03-30 00:00:00    2017    3    March    201703    30    21    Thursday
    2017-03-31 00:00:00    2017    3    March    201703    31    22    Friday
    2017-04-01 00:00:00    2017    4    April    201704    1    0    Saturday
    2017-04-02 00:00:00    2017    4    April    201704    2    0    Sunday
    2017-04-03 00:00:00    2017    4    April    201704    3    1    Monday
    2017-04-04 00:00:00    2017    4    April    201704    4    2    Tuesday
    2017-04-05 00:00:00    2017    4    April    201704    5    3    Wednesday
    2017-04-06 00:00:00    2017    4    April    201704    6    4    Thursday
    2017-04-07 00:00:00    2017    4    April    201704    7    5    Friday
    2017-04-08 00:00:00    2017    4    April    201704    8    5    Saturday
    2017-04-09 00:00:00    2017    4    April    201704    9    5    Sunday
    2017-04-10 00:00:00    2017    4    April    201704    10    6    Monday
    2017-04-11 00:00:00    2017    4    April    201704    11    7    Tuesday
    2017-04-12 00:00:00    2017    4    April    201704    12    8    Wednesday
    2017-04-13 00:00:00    2017    4    April    201704    13    9    Thursday
    2017-04-14 00:00:00    2017    4    April    201704    14    9    Friday
    2017-04-15 00:00:00    2017    4    April    201704    15    9    Saturday
    2017-04-16 00:00:00    2017    4    April    201704    16    9    Sunday
    2017-04-17 00:00:00    2017    4    April    201704    17    10    Monday
    2017-04-18 00:00:00    2017    4    April    201704    18    11    Tuesday
    2017-04-19 00:00:00    2017    4    April    201704    19    12    Wednesday
    2017-04-20 00:00:00    2017    4    April    201704    20    13    Thursday
    2017-04-21 00:00:00    2017    4    April    201704    21    14    Friday
    2017-04-22 00:00:00    2017    4    April    201704    22    14    Saturday
    2017-04-23 00:00:00    2017    4    April    201704    23    14    Sunday
    2017-04-24 00:00:00    2017    4    April    201704    24    14    Monday
    2017-04-25 00:00:00    2017    4    April    201704    25    15    Tuesday
    2017-04-26 00:00:00    2017    4    April    201704    26    16    Wednesday
    2017-04-27 00:00:00    2017    4    April    201704    27    17    Thursday
    2017-04-28 00:00:00    2017    4    April    201704    28    18    Friday
    2017-04-29 00:00:00    2017    4    April    201704    29    18    Saturday
    2017-04-30 00:00:00    2017    4    April    201704    30    18    Sunday
    2017-05-01 00:00:00    2017    5    May    201705    1    0    Monday
    2017-05-02 00:00:00    2017    5    May    201705    2    1    Tuesday
    2017-05-03 00:00:00    2017    5    May    201705    3    2    Wednesday
    2017-05-04 00:00:00    2017    5    May    201705    4    3    Thursday
    2017-05-05 00:00:00    2017    5    May    201705    5    4    Friday
    2017-05-06 00:00:00    2017    5    May    201705    6    4    Saturday
    2017-05-07 00:00:00    2017    5    May    201705    7    4    Sunday
    2017-05-08 00:00:00    2017    5    May    201705    8    5    Monday
    2017-05-09 00:00:00    2017    5    May    201705    9    6    Tuesday
    2017-05-10 00:00:00    2017    5    May    201705    10    7    Wednesday
    2017-05-11 00:00:00    2017    5    May    201705    11    7    Thursday
    2017-05-12 00:00:00    2017    5    May    201705    12    8    Friday
    2017-05-13 00:00:00    2017    5    May    201705    13    8    Saturday
    2017-05-14 00:00:00    2017    5    May    201705    14    8    Sunday
    2017-05-15 00:00:00    2017    5    May    201705    15    9    Monday
    2017-05-16 00:00:00    2017    5    May    201705    16    10    Tuesday
    2017-05-17 00:00:00    2017    5    May    201705    17    11    Wednesday
    2017-05-18 00:00:00    2017    5    May    201705    18    12    Thursday
    2017-05-19 00:00:00    2017    5    May    201705    19    13    Friday
    2017-05-20 00:00:00    2017    5    May    201705    20    13    Saturday
    2017-05-21 00:00:00    2017    5    May    201705    21    13    Sunday
    2017-05-22 00:00:00    2017    5    May    201705    22    14    Monday
    2017-05-23 00:00:00    2017    5    May    201705    23    15    Tuesday
    2017-05-24 00:00:00    2017    5    May    201705    24    16    Wednesday
    2017-05-25 00:00:00    2017    5    May    201705    25    16    Thursday
    2017-05-26 00:00:00    2017    5    May    201705    26    17    Friday
    2017-05-27 00:00:00    2017    5    May    201705    27    17    Saturday
    2017-05-28 00:00:00    2017    5    May    201705    28    17    Sunday
    2017-05-29 00:00:00    2017    5    May    201705    29    18    Monday
    2017-05-30 00:00:00    2017    5    May    201705    30    19    Tuesday
    2017-05-31 00:00:00    2017    5    May    201705    31    20    Wednesday
    2017-06-01 00:00:00    2017    6    June    201706    1    0    Thursday
    2017-06-02 00:00:00    2017    6    June    201706    2    1    Friday
    2017-06-03 00:00:00    2017    6    June    201706    3    1    Saturday
    2017-06-04 00:00:00    2017    6    June    201706    4    1    Sunday
    2017-06-05 00:00:00    2017    6    June    201706    5    2    Monday
    2017-06-06 00:00:00    2017    6    June    201706    6    3    Tuesday
    2017-06-07 00:00:00    2017    6    June    201706    7    4    Wednesday
    2017-06-08 00:00:00    2017    6    June    201706    8    5    Thursday
    2017-06-09 00:00:00    2017    6    June    201706    9    6    Friday
    2017-06-10 00:00:00    2017    6    June    201706    10    6    Saturday
    2017-06-11 00:00:00    2017    6    June    201706    11    6    Sunday
    2017-06-12 00:00:00    2017    6    June    201706    12    7    Monday
    2017-06-13 00:00:00    2017    6    June    201706    13    8    Tuesday
    2017-06-14 00:00:00    2017    6    June    201706    14    9    Wednesday
    2017-06-15 00:00:00    2017    6    June    201706    15    10    Thursday
    2017-06-16 00:00:00    2017    6    June    201706    16    11    Friday
    2017-06-17 00:00:00    2017    6    June    201706    17    11    Saturday
    2017-06-18 00:00:00    2017    6    June    201706    18    11    Sunday
    2017-06-19 00:00:00    2017    6    June    201706    19    12    Monday
    2017-06-20 00:00:00    2017    6    June    201706    20    13    Tuesday
    2017-06-21 00:00:00    2017    6    June    201706    21    14    Wednesday
    2017-06-22 00:00:00    2017    6    June    201706    22    15    Thursday
    2017-06-23 00:00:00    2017    6    June    201706    23    15    Friday
    2017-06-24 00:00:00    2017    6    June    201706    24    15    Saturday
    2017-06-25 00:00:00    2017    6    June    201706    25    15    Sunday
    2017-06-26 00:00:00    2017    6    June    201706    26    15    Monday
    2017-06-27 00:00:00    2017    6    June    201706    27    15    Tuesday
    2017-06-28 00:00:00    2017    6    June    201706    28    15    Wednesday
    2017-06-29 00:00:00    2017    6    June    201706    29    15    Thursday
    2017-06-30 00:00:00    2017    6    June    201706    30    16    Friday
    2017-07-01 00:00:00    2017    7    July    201707    1    0    Saturday
    2017-07-02 00:00:00    2017    7    July    201707    2    0    Sunday
    2017-07-03 00:00:00    2017    7    July    201707    3    1    Monday
    2017-07-04 00:00:00    2017    7    July    201707    4    2    Tuesday
    2017-07-05 00:00:00    2017    7    July    201707    5    3    Wednesday
    2017-07-06 00:00:00    2017    7    July    201707    6    4    Thursday
    2017-07-07 00:00:00    2017    7    July    201707    7    5    Friday
    2017-07-08 00:00:00    2017    7    July    201707    8    5    Saturday
    2017-07-09 00:00:00    2017    7    July    201707    9    5    Sunday
    2017-07-10 00:00:00    2017    7    July    201707    10    6    Monday
    2017-07-11 00:00:00    2017    7    July    201707    11    7    Tuesday
    2017-07-12 00:00:00    2017    7    July    201707    12    8    Wednesday
    2017-07-13 00:00:00    2017    7    July    201707    13    9    Thursday
    2017-07-14 00:00:00    2017    7    July    201707    14    10    Friday
    2017-07-15 00:00:00    2017    7    July    201707    15    10    Saturday
    2017-07-16 00:00:00    2017    7    July    201707    16    10    Sunday
    2017-07-17 00:00:00    2017    7    July    201707    17    11    Monday
    2017-07-18 00:00:00    2017    7    July    201707    18    12    Tuesday
    2017-07-19 00:00:00    2017    7    July    201707    19    13    Wednesday
    2017-07-20 00:00:00    2017    7    July    201707    20    14    Thursday
    2017-07-21 00:00:00    2017    7    July    201707    21    15    Friday
    2017-07-22 00:00:00    2017    7    July    201707    22    15    Saturday
    2017-07-23 00:00:00    2017    7    July    201707    23    15    Sunday
    2017-07-24 00:00:00    2017    7    July    201707    24    16    Monday
    2017-07-25 00:00:00    2017    7    July    201707    25    17    Tuesday
    2017-07-26 00:00:00    2017    7    July    201707    26    18    Wednesday
    2017-07-27 00:00:00    2017    7    July    201707    27    19    Thursday
    2017-07-28 00:00:00    2017    7    July    201707    28    20    Friday
    2017-07-29 00:00:00    2017    7    July    201707    29    20    Saturday
    2017-07-30 00:00:00    2017    7    July    201707    30    20    Sunday
    2017-07-31 00:00:00    2017    7    July    201707    31    21    Monday
    2017-08-01 00:00:00    2017    8    August    201708    1    1    Tuesday
    2017-08-02 00:00:00    2017    8    August    201708    2    2    Wednesday
    2017-08-03 00:00:00    2017    8    August    201708    3    3    Thursday
    2017-08-04 00:00:00    2017    8    August    201708    4    4    Friday
    2017-08-05 00:00:00    2017    8    August    201708    5    4    Saturday
    2017-08-06 00:00:00    2017    8    August    201708    6    4    Sunday
    2017-08-07 00:00:00    2017    8    August    201708    7    5    Monday
    2017-08-08 00:00:00    2017    8    August    201708    8    6    Tuesday
    2017-08-09 00:00:00    2017    8    August    201708    9    7    Wednesday
    2017-08-10 00:00:00    2017    8    August    201708    10    8    Thursday
    2017-08-11 00:00:00    2017    8    August    201708    11    9    Friday
    2017-08-12 00:00:00    2017    8    August    201708    12    9    Saturday
    2017-08-13 00:00:00    2017    8    August    201708    13    9    Sunday
    2017-08-14 00:00:00    2017    8    August    201708    14    10    Monday
    2017-08-15 00:00:00    2017    8    August    201708    15    11    Tuesday
    2017-08-16 00:00:00    2017    8    August    201708    16    12    Wednesday
    2017-08-17 00:00:00    2017    8    August    201708    17    12    Thursday
    2017-08-18 00:00:00    2017    8    August    201708    18    13    Friday
    2017-08-19 00:00:00    2017    8    August    201708    19    13    Saturday
    2017-08-20 00:00:00    2017    8    August    201708    20    13    Sunday
    2017-08-21 00:00:00    2017    8    August    201708    21    14    Monday
    2017-08-22 00:00:00    2017    8    August    201708    22    15    Tuesday
    2017-08-23 00:00:00    2017    8    August    201708    23    16    Wednesday
    2017-08-24 00:00:00    2017    8    August    201708    24    17    Thursday
    2017-08-25 00:00:00    2017    8    August    201708    25    18    Friday
    2017-08-26 00:00:00    2017    8    August    201708    26    18    Saturday
    2017-08-27 00:00:00    2017    8    August    201708    27    18    Sunday
    2017-08-28 00:00:00    2017    8    August    201708    28    19    Monday
    2017-08-29 00:00:00    2017    8    August    201708    29    20    Tuesday
    2017-08-30 00:00:00    2017    8    August    201708    30    21    Wednesday
    2017-08-31 00:00:00    2017    8    August    201708    31    22    Thursday
    2017-09-01 00:00:00    2017    9    September    201709    1    0    Friday
    2017-09-02 00:00:00    2017    9    September    201709    2    0    Saturday
    2017-09-03 00:00:00    2017    9    September    201709    3    0    Sunday
    2017-09-04 00:00:00    2017    9    September    201709    4    1    Monday
    2017-09-05 00:00:00    2017    9    September    201709    5    2    Tuesday
    2017-09-06 00:00:00    2017    9    September    201709    6    3    Wednesday
    2017-09-07 00:00:00    2017    9    September    201709    7    4    Thursday
    2017-09-08 00:00:00    2017    9    September    201709    8    5    Friday
    2017-09-09 00:00:00    2017    9    September    201709    9    5    Saturday
    2017-09-10 00:00:00    2017    9    September    201709    10    5    Sunday
    2017-09-11 00:00:00    2017    9    September    201709    11    6    Monday
    2017-09-12 00:00:00    2017    9    September    201709    12    7    Tuesday
    2017-09-13 00:00:00    2017    9    September    201709    13    8    Wednesday
    2017-09-14 00:00:00    2017    9    September    201709    14    9    Thursday
    2017-09-15 00:00:00    2017    9    September    201709    15    10    Friday
    2017-09-16 00:00:00    2017    9    September    201709    16    10    Saturday
    2017-09-17 00:00:00    2017    9    September    201709    17    10    Sunday
    2017-09-18 00:00:00    2017    9    September    201709    18    11    Monday
    2017-09-19 00:00:00    2017    9    September    201709    19    12    Tuesday
    2017-09-20 00:00:00    2017    9    September    201709    20    13    Wednesday
    2017-09-21 00:00:00    2017    9    September    201709    21    13    Thursday
    2017-09-22 00:00:00    2017    9    September    201709    22    14    Friday
    2017-09-23 00:00:00    2017    9    September    201709    23    14    Saturday
    2017-09-24 00:00:00    2017    9    September    201709    24    14    Sunday
    2017-09-25 00:00:00    2017    9    September    201709    25    15    Monday
    2017-09-26 00:00:00    2017    9    September    201709    26    16    Tuesday
    2017-09-27 00:00:00    2017    9    September    201709    27    17    Wednesday
    2017-09-28 00:00:00    2017    9    September    201709    28    18    Thursday
    2017-09-29 00:00:00    2017    9    September    201709    29    19    Friday
    2017-09-30 00:00:00    2017    9    September    201709    30    19    Saturday
    2017-10-01 00:00:00    2017    10    October    201710    1    0    Sunday
    2017-10-02 00:00:00    2017    10    October    201710    2    1    Monday
    2017-10-03 00:00:00    2017    10    October    201710    3    2    Tuesday
    2017-10-04 00:00:00    2017    10    October    201710    4    3    Wednesday
    2017-10-05 00:00:00    2017    10    October    201710    5    4    Thursday
    2017-10-06 00:00:00    2017    10    October    201710    6    5    Friday
    2017-10-07 00:00:00    2017    10    October    201710    7    5    Saturday
    2017-10-08 00:00:00    2017    10    October    201710    8    5    Sunday
    2017-10-09 00:00:00    2017    10    October    201710    9    6    Monday
    2017-10-10 00:00:00    2017    10    October    201710    10    7    Tuesday
    2017-10-11 00:00:00    2017    10    October    201710    11    8    Wednesday
    2017-10-12 00:00:00    2017    10    October    201710    12    9    Thursday
    2017-10-13 00:00:00    2017    10    October    201710    13    10    Friday
    2017-10-14 00:00:00    2017    10    October    201710    14    10    Saturday
    2017-10-15 00:00:00    2017    10    October    201710    15    10    Sunday
    2017-10-16 00:00:00    2017    10    October    201710    16    11    Monday
    2017-10-17 00:00:00    2017    10    October    201710    17    12    Tuesday
    2017-10-18 00:00:00    2017    10    October    201710    18    13    Wednesday
    2017-10-19 00:00:00    2017    10    October    201710    19    14    Thursday
    2017-10-20 00:00:00    2017    10    October    201710    20    15    Friday
    2017-10-21 00:00:00    2017    10    October    201710    21    15    Saturday
    2017-10-22 00:00:00    2017    10    October    201710    22    15    Sunday
    2017-10-23 00:00:00    2017    10    October    201710    23    16    Monday
    2017-10-24 00:00:00    2017    10    October    201710    24    17    Tuesday
    2017-10-25 00:00:00    2017    10    October    201710    25    18    Wednesday
    2017-10-26 00:00:00    2017    10    October    201710    26    19    Thursday
    2017-10-27 00:00:00    2017    10    October    201710    27    20    Friday
    2017-10-28 00:00:00    2017    10    October    201710    28    20    Saturday
    2017-10-29 00:00:00    2017    10    October    201710    29    20    Sunday
    2017-10-30 00:00:00    2017    10    October    201710    30    21    Monday
    2017-10-31 00:00:00    2017    10    October    201710    31    22    Tuesday
    2017-11-01 00:00:00    2017    11    November    201711    1    1    Wednesday
    2017-11-02 00:00:00    2017    11    November    201711    2    2    Thursday
    2017-11-03 00:00:00    2017    11    November    201711    3    3    Friday
    2017-11-04 00:00:00    2017    11    November    201711    4    3    Saturday
    2017-11-05 00:00:00    2017    11    November    201711    5    3    Sunday
    2017-11-06 00:00:00    2017    11    November    201711    6    4    Monday
    2017-11-07 00:00:00    2017    11    November    201711    7    5    Tuesday
    2017-11-08 00:00:00    2017    11    November    201711    8    6    Wednesday
    2017-11-09 00:00:00    2017    11    November    201711    9    7    Thursday
    2017-11-10 00:00:00    2017    11    November    201711    10    8    Friday
    2017-11-11 00:00:00    2017    11    November    201711    11    8    Saturday
    2017-11-12 00:00:00    2017    11    November    201711    12    8    Sunday
    2017-11-13 00:00:00    2017    11    November    201711    13    9    Monday
    2017-11-14 00:00:00    2017    11    November    201711    14    10    Tuesday
    2017-11-15 00:00:00    2017    11    November    201711    15    11    Wednesday
    2017-11-16 00:00:00    2017    11    November    201711    16    12    Thursday
    2017-11-17 00:00:00    2017    11    November    201711    17    13    Friday
    2017-11-18 00:00:00    2017    11    November    201711    18    13    Saturday
    2017-11-19 00:00:00    2017    11    November    201711    19    13    Sunday
    2017-11-20 00:00:00    2017    11    November    201711    20    14    Monday
    2017-11-21 00:00:00    2017    11    November    201711    21    15    Tuesday
    2017-11-22 00:00:00    2017    11    November    201711    22    16    Wednesday
    2017-11-23 00:00:00    2017    11    November    201711    23    17    Thursday
    2017-11-24 00:00:00    2017    11    November    201711    24    18    Friday
    2017-11-25 00:00:00    2017    11    November    201711    25    18    Saturday
    2017-11-26 00:00:00    2017    11    November    201711    26    18    Sunday
    2017-11-27 00:00:00    2017    11    November    201711    27    19    Monday
    2017-11-28 00:00:00    2017    11    November    201711    28    20    Tuesday
    2017-11-29 00:00:00    2017    11    November    201711    29    21    Wednesday
    2017-11-30 00:00:00    2017    11    November    201711    30    22    Thursday
    2017-12-01 00:00:00    2017    12    December    201712    1    0    Friday
    2017-12-02 00:00:00    2017    12    December    201712    2    0    Saturday
    2017-12-03 00:00:00    2017    12    December    201712    3    0    Sunday
    2017-12-04 00:00:00    2017    12    December    201712    4    1    Monday
    2017-12-05 00:00:00    2017    12    December    201712    5    2    Tuesday
    2017-12-06 00:00:00    2017    12    December    201712    6    3    Wednesday
    2017-12-07 00:00:00    2017    12    December    201712    7    4    Thursday
    2017-12-08 00:00:00    2017    12    December    201712    8    5    Friday
    2017-12-09 00:00:00    2017    12    December    201712    9    5    Saturday
    2017-12-10 00:00:00    2017    12    December    201712    10    5    Sunday
    2017-12-11 00:00:00    2017    12    December    201712    11    6    Monday
    2017-12-12 00:00:00    2017    12    December    201712    12    7    Tuesday
    2017-12-13 00:00:00    2017    12    December    201712    13    8    Wednesday
    2017-12-14 00:00:00    2017    12    December    201712    14    9    Thursday
    2017-12-15 00:00:00    2017    12    December    201712    15    10    Friday
    2017-12-16 00:00:00    2017    12    December    201712    16    10    Saturday
    2017-12-17 00:00:00    2017    12    December    201712    17    10    Sunday
    2017-12-18 00:00:00    2017    12    December    201712    18    11    Monday
    2017-12-19 00:00:00    2017    12    December    201712    19    12    Tuesday
    2017-12-20 00:00:00    2017    12    December    201712    20    13    Wednesday
    2017-12-21 00:00:00    2017    12    December    201712    21    14    Thursday
    2017-12-22 00:00:00    2017    12    December    201712    22    15    Friday
    2017-12-23 00:00:00    2017    12    December    201712    23    15    Saturday
    2017-12-24 00:00:00    2017    12    December    201712    24    15    Sunday
    2017-12-25 00:00:00    2017    12    December    201712    25    15    Monday
    2017-12-26 00:00:00    2017    12    December    201712    26    15    Tuesday
    2017-12-27 00:00:00    2017    12    December    201712    27    16    Wednesday
    2017-12-28 00:00:00    2017    12    December    201712    28    17    Thursday
    2017-12-29 00:00:00    2017    12    December    201712    29    18    Friday
    2017-12-30 00:00:00    2017    12    December    201712    30    18    Saturday
    2017-12-31 00:00:00    2017    12    December    201712    31    18    Sunday

    3. Crerate Parameter and Insert the Dummy Date into Parameter:

    CREATE TABLE [dbo].[parameter](
     [id] [int] NOT NULL,
     [Table_Name] [nvarchar](50) NULL,
    CONSTRAINT [PK_parameter] PRIMARY KEY CLUSTERED
    (
     [id] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    GO

    INSERT INTO [dbo].[parameter]
      ([id]
      ,[Table_Name])
     VALUES
    ('1','dbo.DB_dummyDATE')

    GO

    4. Exec this SP

    declare @maxid int,
    @flag int,
    @SQLSTATE varchar (8000),
    @name varchar (50),
    @a date,@b date,@c date,@d date,@e date,@f date,@g date,@h date,@i date,@j date,@k date,@l date,@m date,@n date,@o date,@p date,@q date,@r date,@s date,@t date,@u date,@v date,@w date,@x date,@y date,@z date,@aa date,@bb date, @cc date

    set @maxid = (select max(id) from dwim.dbo.parameter)
    set @flag = '1'
    set @a = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-1,0))as date)
    set @b = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-2,0))as date)
    set @c = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-3,0))as date)
    set @d = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-4,0))as date)
    set @e = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-5,0))as date)
    set @f = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-6,0))as date)
    set @g = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-7,0))as date)
    set @h = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-8,0))as date)
    set @i = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-9,0))as date)
    set @j = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-10,0))as date)
    set @k = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-11,0))as date)
    set @l = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-12,0))as date)
    set @m = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-13,0))as date)
    set @n = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-14,0))as date)
    set @o = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-15,0))as date)
    set @p = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-16,0))as date)
    set @q = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-17,0))as date)
    set @r = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-18,0))as date)
    set @s = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-19,0))as date)
    set @t = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-20,0))as date)
    set @u = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-21,0))as date)
    set @v = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-22,0))as date)
    set @w = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-23,0))as date)
    set @x = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-24,0))as date)
    set @y = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-25,0))as date)
    set @z = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-26,0))as date)
    set @aa = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-27,0))as date)
    set @bb = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-28,0))as date)
    set @cc = cast(DATEADD(s,-1,DATEADD(mm, DATEDIFF(m,0,GETDATE())-29,0))as date)

    while (@flag <= @maxid)
    begin
     set @nama = (select nama_table from dwim.dbo.parameter where id = @flag)

     set @SQLSTATE = 'select 1 while @@ROWCOUNT > 0 BEGIN delete top (5000) from dwim.' +@name+' where datekey < ''' +cast(@d as varchar)+'''
    and datekey not in (''' +cast(@d as varchar)+''',
    ''' +cast(@e as varchar)+''',
    ''' +cast(@f as varchar)+''',
    ''' +cast(@g as varchar)+''',
    ''' +cast(@h as varchar)+''',
    ''' +cast(@i as varchar)+''',
    ''' +cast(@j as varchar)+''',
    ''' +cast(@k as varchar)+''',
    ''' +cast(@l as varchar)+''',
    ''' +cast(@m as varchar)+''',
    ''' +cast(@n as varchar)+''',
    ''' +cast(@o as varchar)+''',
    ''' +cast(@p as varchar)+''',
    ''' +cast(@q as varchar)+''',
    ''' +cast(@r as varchar)+''',
    ''' +cast(@s as varchar)+''',
    ''' +cast(@t as varchar)+''',
    ''' +cast(@u as varchar)+''',
    ''' +cast(@v as varchar)+''',
    ''' +cast(@w as varchar)+''',
    ''' +cast(@x as varchar)+''',
    ''' +cast(@y as varchar)+''',
    ''' +cast(@z as varchar)+''',
    ''' +cast(@aa as varchar)+''',
    ''' +cast(@bb as varchar)+''',
    ''' +cast(@cc as varchar)+'''
    ) END'
    --end
     print @SQLSTATE
     --exec (@SQLSTATE)
     set @flag = @flag + 1
    end

    The Result:

    -- >6 MONTHS only keep the last date
    -- < 6 Months keep the full date (ex: from 01 August 2017-31 August 2017)

    datekey    yearnumber    monthnumberofyear    monthnameofyear    monthcode    daynumberofmonthcalendar    daynumberofmonthbusiness    daynameofweek
    2015-06-30 00:00:00    2015    6    June    201506    30    21    Tuesday
    2015-07-31 00:00:00    2015    7    July    201507    31    20    Friday
    2015-08-31 00:00:00    2015    8    August    201508    31    20    Monday
    2015-09-30 00:00:00    2015    9    September    201509    30    21    Wednesday
    2015-10-31 00:00:00    2015    10    October    201510    31    0    Saturday
    2015-11-30 00:00:00    2015    11    November    201511    30    21    Monday
    2015-12-31 00:00:00    2015    12    December    201512    31    20    Thursday
    2016-01-31 00:00:00    2016    1    January    201601    31    20    Sunday
    2016-02-29 00:00:00    2016    2    February    201602    29    20    Monday
    2016-03-31 00:00:00    2016    3    March    201603    31    21    Thursday
    2016-04-30 00:00:00    2016    4    April    201604    30    21    Saturday
    2016-05-31 00:00:00    2016    5    May    201605    31    20    Tuesday
    2016-06-30 00:00:00    2016    6    June    201606    30    22    Thursday
    2016-07-31 00:00:00    2016    7    July    201607    31    17    Sunday
    2016-08-31 00:00:00    2016    8    August    201608    31    22    Wednesday
    2016-09-30 00:00:00    2016    9    September    201609    30    21    Friday
    2016-10-31 00:00:00    2016    10    October    201610    31    21    Monday
    2016-11-30 00:00:00    2016    11    November    201611    30    22    Wednesday
    2016-12-31 00:00:00    2016    12    December    201612    31    21    Saturday
    2017-01-31 00:00:00    2017    1    January    201701    31    21    Tuesday
    2017-02-28 00:00:00    2017    2    February    201702    28    19    Tuesday
    2017-03-31 00:00:00    2017    3    March    201703    31    22    Friday
    2017-04-30 00:00:00    2017    4    April    201704    30    18    Sunday
    2017-05-31 00:00:00    2017    5    May    201705    31    20    Wednesday
    2017-06-30 00:00:00    2017    6    June    201706    30    16    Friday
    2017-07-31 00:00:00    2017    7    July    201707    31    21    Monday
    2017-08-01 00:00:00    2017    8    August    201708    1    1    Tuesday
    2017-08-02 00:00:00    2017    8    August    201708    2    2    Wednesday
    2017-08-03 00:00:00    2017    8    August    201708    3    3    Thursday
    2017-08-04 00:00:00    2017    8    August    201708    4    4    Friday
    2017-08-05 00:00:00    2017    8    August    201708    5    4    Saturday
    2017-08-06 00:00:00    2017    8    August    201708    6    4    Sunday
    2017-08-07 00:00:00    2017    8    August    201708    7    5    Monday
    2017-08-08 00:00:00    2017    8    August    201708    8    6    Tuesday
    2017-08-09 00:00:00    2017    8    August    201708    9    7    Wednesday
    2017-08-10 00:00:00    2017    8    August    201708    10    8    Thursday
    2017-08-11 00:00:00    2017    8    August    201708    11    9    Friday
    2017-08-12 00:00:00    2017    8    August    201708    12    9    Saturday
    2017-08-13 00:00:00    2017    8    August    201708    13    9    Sunday
    2017-08-14 00:00:00    2017    8    August    201708    14    10    Monday
    2017-08-15 00:00:00    2017    8    August    201708    15    11    Tuesday
    2017-08-16 00:00:00    2017    8    August    201708    16    12    Wednesday
    2017-08-17 00:00:00    2017    8    August    201708    17    12    Thursday
    2017-08-18 00:00:00    2017    8    August    201708    18    13    Friday
    2017-08-19 00:00:00    2017    8    August    201708    19    13    Saturday
    2017-08-20 00:00:00    2017    8    August    201708    20    13    Sunday
    2017-08-21 00:00:00    2017    8    August    201708    21    14    Monday
    2017-08-22 00:00:00    2017    8    August    201708    22    15    Tuesday
    2017-08-23 00:00:00    2017    8    August    201708    23    16    Wednesday
    2017-08-24 00:00:00    2017    8    August    201708    24    17    Thursday
    2017-08-25 00:00:00    2017    8    August    201708    25    18    Friday
    2017-08-26 00:00:00    2017    8    August    201708    26    18    Saturday
    2017-08-27 00:00:00    2017    8    August    201708    27    18    Sunday
    2017-08-28 00:00:00    2017    8    August    201708    28    19    Monday
    2017-08-29 00:00:00    2017    8    August    201708    29    20    Tuesday
    2017-08-30 00:00:00    2017    8    August    201708    30    21    Wednesday
    2017-08-31 00:00:00    2017    8    August    201708    31    22    Thursday
    2017-09-01 00:00:00    2017    9    September    201709    1    0    Friday
    2017-09-02 00:00:00    2017    9    September    201709    2    0    Saturday
    2017-09-03 00:00:00    2017    9    September    201709    3    0    Sunday
    2017-09-04 00:00:00    2017    9    September    201709    4    1    Monday
    2017-09-05 00:00:00    2017    9    September    201709    5    2    Tuesday
    2017-09-06 00:00:00    2017    9    September    201709    6    3    Wednesday
    2017-09-07 00:00:00    2017    9    September    201709    7    4    Thursday
    2017-09-08 00:00:00    2017    9    September    201709    8    5    Friday
    2017-09-09 00:00:00    2017    9    September    201709    9    5    Saturday
    2017-09-10 00:00:00    2017    9    September    201709    10    5    Sunday
    2017-09-11 00:00:00    2017    9    September    201709    11    6    Monday
    2017-09-12 00:00:00    2017    9    September    201709    12    7    Tuesday
    2017-09-13 00:00:00    2017    9    September    201709    13    8    Wednesday
    2017-09-14 00:00:00    2017    9    September    201709    14    9    Thursday
    2017-09-15 00:00:00    2017    9    September    201709    15    10    Friday
    2017-09-16 00:00:00    2017    9    September    201709    16    10    Saturday
    2017-09-17 00:00:00    2017    9    September    201709    17    10    Sunday
    2017-09-18 00:00:00    2017    9    September    201709    18    11    Monday
    2017-09-19 00:00:00    2017    9    September    201709    19    12    Tuesday
    2017-09-20 00:00:00    2017    9    September    201709    20    13    Wednesday
    2017-09-21 00:00:00    2017    9    September    201709    21    13    Thursday
    2017-09-22 00:00:00    2017    9    September    201709    22    14    Friday
    2017-09-23 00:00:00    2017    9    September    201709    23    14    Saturday
    2017-09-24 00:00:00    2017    9    September    201709    24    14    Sunday
    2017-09-25 00:00:00    2017    9    September    201709    25    15    Monday
    2017-09-26 00:00:00    2017    9    September    201709    26    16    Tuesday
    2017-09-27 00:00:00    2017    9    September    201709    27    17    Wednesday
    2017-09-28 00:00:00    2017    9    September    201709    28    18    Thursday
    2017-09-29 00:00:00    2017    9    September    201709    29    19    Friday
    2017-09-30 00:00:00    2017    9    September    201709    30    19    Saturday
    2017-10-01 00:00:00    2017    10    October    201710    1    0    Sunday
    2017-10-02 00:00:00    2017    10    October    201710    2    1    Monday
    2017-10-03 00:00:00    2017    10    October    201710    3    2    Tuesday
    2017-10-04 00:00:00    2017    10    October    201710    4    3    Wednesday
    2017-10-05 00:00:00    2017    10    October    201710    5    4    Thursday
    2017-10-06 00:00:00    2017    10    October    201710    6    5    Friday
    2017-10-07 00:00:00    2017    10    October    201710    7    5    Saturday
    2017-10-08 00:00:00    2017    10    October    201710    8    5    Sunday
    2017-10-09 00:00:00    2017    10    October    201710    9    6    Monday
    2017-10-10 00:00:00    2017    10    October    201710    10    7    Tuesday
    2017-10-11 00:00:00    2017    10    October    201710    11    8    Wednesday
    2017-10-12 00:00:00    2017    10    October    201710    12    9    Thursday
    2017-10-13 00:00:00    2017    10    October    201710    13    10    Friday
    2017-10-14 00:00:00    2017    10    October    201710    14    10    Saturday
    2017-10-15 00:00:00    2017    10    October    201710    15    10    Sunday
    2017-10-16 00:00:00    2017    10    October    201710    16    11    Monday
    2017-10-17 00:00:00    2017    10    October    201710    17    12    Tuesday
    2017-10-18 00:00:00    2017    10    October    201710    18    13    Wednesday
    2017-10-19 00:00:00    2017    10    October    201710    19    14    Thursday
    2017-10-20 00:00:00    2017    10    October    201710    20    15    Friday
    2017-10-21 00:00:00    2017    10    October    201710    21    15    Saturday
    2017-10-22 00:00:00    2017    10    October    201710    22    15    Sunday
    2017-10-23 00:00:00    2017    10    October    201710    23    16    Monday
    2017-10-24 00:00:00    2017    10    October    201710    24    17    Tuesday
    2017-10-25 00:00:00    2017    10    October    201710    25    18    Wednesday
    2017-10-26 00:00:00    2017    10    October    201710    26    19    Thursday
    2017-10-27 00:00:00    2017    10    October    201710    27    20    Friday
    2017-10-28 00:00:00    2017    10    October    201710    28    20    Saturday
    2017-10-29 00:00:00    2017    10    October    201710    29    20    Sunday
    2017-10-30 00:00:00    2017    10    October    201710    30    21    Monday
    2017-10-31 00:00:00    2017    10    October    201710    31    22    Tuesday
    2017-11-01 00:00:00    2017    11    November    201711    1    1    Wednesday
    2017-11-02 00:00:00    2017    11    November    201711    2    2    Thursday
    2017-11-03 00:00:00    2017    11    November    201711    3    3    Friday
    2017-11-04 00:00:00    2017    11    November    201711    4    3    Saturday
    2017-11-05 00:00:00    2017    11    November    201711    5    3    Sunday
    2017-11-06 00:00:00    2017    11    November    201711    6    4    Monday
    2017-11-07 00:00:00    2017    11    November    201711    7    5    Tuesday
    2017-11-08 00:00:00    2017    11    November    201711    8    6    Wednesday
    2017-11-09 00:00:00    2017    11    November    201711    9    7    Thursday
    2017-11-10 00:00:00    2017    11    November    201711    10    8    Friday
    2017-11-11 00:00:00    2017    11    November    201711    11    8    Saturday
    2017-11-12 00:00:00    2017    11    November    201711    12    8    Sunday
    2017-11-13 00:00:00    2017    11    November    201711    13    9    Monday
    2017-11-14 00:00:00    2017    11    November    201711    14    10    Tuesday
    2017-11-15 00:00:00    2017    11    November    201711    15    11    Wednesday
    2017-11-16 00:00:00    2017    11    November    201711    16    12    Thursday
    2017-11-17 00:00:00    2017    11    November    201711    17    13    Friday
    2017-11-18 00:00:00    2017    11    November    201711    18    13    Saturday
    2017-11-19 00:00:00    2017    11    November    201711    19    13    Sunday
    2017-11-20 00:00:00    2017    11    November    201711    20    14    Monday
    2017-11-21 00:00:00    2017    11    November    201711    21    15    Tuesday
    2017-11-22 00:00:00    2017    11    November    201711    22    16    Wednesday
    2017-11-23 00:00:00    2017    11    November    201711    23    17    Thursday
    2017-11-24 00:00:00    2017    11    November    201711    24    18    Friday
    2017-11-25 00:00:00    2017    11    November    201711    25    18    Saturday
    2017-11-26 00:00:00    2017    11    November    201711    26    18    Sunday
    2017-11-27 00:00:00    2017    11    November    201711    27    19    Monday
    2017-11-28 00:00:00    2017    11    November    201711    28    20    Tuesday
    2017-11-29 00:00:00    2017    11    November    201711    29    21    Wednesday
    2017-11-30 00:00:00    2017    11    November    201711    30    22    Thursday
    2017-12-01 00:00:00    2017    12    December    201712    1    0    Friday
    2017-12-02 00:00:00    2017    12    December    201712    2    0    Saturday
    2017-12-03 00:00:00    2017    12    December    201712    3    0    Sunday
    2017-12-04 00:00:00    2017    12    December    201712    4    1    Monday
    2017-12-05 00:00:00    2017    12    December    201712    5    2    Tuesday
    2017-12-06 00:00:00    2017    12    December    201712    6    3    Wednesday
    2017-12-07 00:00:00    2017    12    December    201712    7    4    Thursday
    2017-12-08 00:00:00    2017    12    December    201712    8    5    Friday
    2017-12-09 00:00:00    2017    12    December    201712    9    5    Saturday
    2017-12-10 00:00:00    2017    12    December    201712    10    5    Sunday
    2017-12-11 00:00:00    2017    12    December    201712    11    6    Monday
    2017-12-12 00:00:00    2017    12    December    201712    12    7    Tuesday
    2017-12-13 00:00:00    2017    12    December    201712    13    8    Wednesday
    2017-12-14 00:00:00    2017    12    December    201712    14    9    Thursday
    2017-12-15 00:00:00    2017    12    December    201712    15    10    Friday
    2017-12-16 00:00:00    2017    12    December    201712    16    10    Saturday
    2017-12-17 00:00:00    2017    12    December    201712    17    10    Sunday
    2017-12-18 00:00:00    2017    12    December    201712    18    11    Monday
    2017-12-19 00:00:00    2017    12    December    201712    19    12    Tuesday
    2017-12-20 00:00:00    2017    12    December    201712    20    13    Wednesday
    2017-12-21 00:00:00    2017    12    December    201712    21    14    Thursday
    2017-12-22 00:00:00    2017    12    December    201712    22    15    Friday
    2017-12-23 00:00:00    2017    12    December    201712    23    15    Saturday
    2017-12-24 00:00:00    2017    12    December    201712    24    15    Sunday
    2017-12-25 00:00:00    2017    12    December    201712    25    15    Monday
    2017-12-26 00:00:00    2017    12    December    201712    26    15    Tuesday
    2017-12-27 00:00:00    2017    12    December    201712    27    16    Wednesday
    2017-12-28 00:00:00    2017    12    December    201712    28    17    Thursday
    2017-12-29 00:00:00    2017    12    December    201712    29    18    Friday
    2017-12-30 00:00:00    2017    12    December    201712    30    18    Saturday
    2017-12-31 00:00:00    2017    12    December    201712    31    18    Sunday

  • So you want to delete from your date dimension table on a regular basis??? :blink:

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Tuesday, October 31, 2017 8:24 AM

    So you want to delete from your date dimension table on a regular basis??? :blink:

    Yup.
    Thats db_datedummy just an example data.
    And there is another requests,
    Delete data for 3 months,6 months,and 12 months earlier but still keep the last date.

  • I would then have to question why maintain a physical table at all.   If all one would want is a calendar table for the last 6 months, and then only the last date of the month for any earlier dates, that seems easier to do in a CTE.   I'm guessing Jeff probably has that kind of code right handy...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • unas_sasing - Tuesday, October 31, 2017 10:21 AM

    Jeff Moden - Tuesday, October 31, 2017 8:24 AM

    So you want to delete from your date dimension table on a regular basis??? :blink:

    Yup.
    Thats db_datedummy just an example data.
    And there is another requests,
    Delete data for 3 months,6 months,and 12 months earlier but still keep the last date.

    You keep saying unqualified things like "delete data" and you say "Yup" but then you say "db_datedummy just an example data" and I don't know what it is that you're actually trying to delete from.  I especially can't believe that anyone would be asking for code to delete from a date dimension table.

    A lot of us can help here but I don't want to write something based on a bogus example and then have you come back and say you can't make it work somewhere else.

    I'm not trying to be difficult here... I'm just not bagging what you're raking.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Jeff Moden - Tuesday, October 31, 2017 3:55 PM

    unas_sasing - Tuesday, October 31, 2017 10:21 AM

    Jeff Moden - Tuesday, October 31, 2017 8:24 AM

    So you want to delete from your date dimension table on a regular basis??? :blink:

    Yup.
    Thats db_datedummy just an example data.
    And there is another requests,
    Delete data for 3 months,6 months,and 12 months earlier but still keep the last date.

    You keep saying unqualified things like "delete data" and you say "Yup" but then you say "db_datedummy just an example data" and I don't know what it is that you're actually trying to delete from.  I especially can't believe that anyone would be asking for code to delete from a date dimension table.

    A lot of us can help here but I don't want to write something based on a bogus example and then have you come back and say you can't make it work somewhere else.

    I'm not trying to be difficult here... I'm just not bagging what you're raking.

    Pretty good bet we have a language barrier problem here...   I have yet to fully understand what the original poster wants, although not for lack of trying...

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • sgmunson - Wednesday, November 1, 2017 2:06 PM

    Jeff Moden - Tuesday, October 31, 2017 3:55 PM

    unas_sasing - Tuesday, October 31, 2017 10:21 AM

    Jeff Moden - Tuesday, October 31, 2017 8:24 AM

    So you want to delete from your date dimension table on a regular basis??? :blink:

    Yup.
    Thats db_datedummy just an example data.
    And there is another requests,
    Delete data for 3 months,6 months,and 12 months earlier but still keep the last date.

    You keep saying unqualified things like "delete data" and you say "Yup" but then you say "db_datedummy just an example data" and I don't know what it is that you're actually trying to delete from.  I especially can't believe that anyone would be asking for code to delete from a date dimension table.

    A lot of us can help here but I don't want to write something based on a bogus example and then have you come back and say you can't make it work somewhere else.

    I'm not trying to be difficult here... I'm just not bagging what you're raking.

    Pretty good bet we have a language barrier problem here...   I have yet to fully understand what the original poster wants, although not for lack of trying...

    I'm sorry to confuse you.I am just trying to cover my bank data data in my placework. And the above example is what I have tried and just delete the old date from 1096 rows to 394 rows.

  • I definitely think there is a language barrier here as I am still hung up on 

    I have an assignment, to Purging data, with conditions:

    I am not sure if from the date dimension table OR a date column in a another table. He may be trying to just select these dates of interest into some temporary table and delete the rows in another table that join to the temporary table. But again, just a educated guess. 

    ----------------------------------------------------

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic. Login to reply