1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="Data Source=intranet;Initial Catalog="gestion entrees";User ID=sa;Password=spssps" ProviderName="System.Data.SqlClient" SelectCommand="select CONVERT(VARCHAR,date,103) as date from
(
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())-4*7 as date
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())-3*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())-2*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())-1*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+1*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+2*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+3*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+4*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+5*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+6*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+7*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+8*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+9*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+10*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+11*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+12*7
union
select DATEADD(DAY, 1-DatePart(DW, getDate()+1), getDate())+13*7
) as date">
</asp:SqlDataSource> |