blog.Toby

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            130 隨筆 :: 2 文章 :: 150 評論 :: 0 Trackbacks
          應用案例:Reporting Service 報表參數預設值技巧

          例一:預設值為昨日

          1 dateadd("d",-1,today) 
          view plain | print | copy to clipboard | ?

           

          說明:將今天日期加上【-1】。

          函數:dateadd , today

          例二:預設值為上月最後一天

          1 dateadd("d",-1, cdate("#" & year(today).ToString   
          2 "/" &   month(today).ToString  & "/1#"))  
          view plain | print | copy to clipboard | ?

           

          說明:先取得【本月第一天】的日期,再加上【-1】,就可得到【上月最後一天】。

          函數:dateadd , cdate , year , today , month

          例三:預設值為上月第一天

          1 cdate("#" & year(dateadd("m",-1,today)).ToString   
          2 "/" &   month(dateadd("m",-1,today)).ToString  & "/1#")  
          view plain | print | copy to clipboard | ?

           

          說明:先取得上月份的年度,接著取得上月份,最後連同字串1一起串連。

          函數:cdate , year , dateadd , today , month 

          posted on 2008-03-11 12:16 渠上月 閱讀(1135) 評論(0)  編輯  收藏 所屬分類: VS 2005
          主站蜘蛛池模板: 南召县| 永川市| 镶黄旗| 玛沁县| 平果县| 河北区| 大余县| 环江| 香河县| 吴川市| 龙川县| 兰州市| 类乌齐县| 平阳县| 东光县| 吕梁市| 翁牛特旗| 南涧| 思南县| 洪湖市| 闽侯县| 南京市| 镇原县| 连州市| 徐州市| 玉门市| 赣州市| 志丹县| 永福县| 鞍山市| 兴文县| 太谷县| 沙洋县| 赫章县| 临城县| 佳木斯市| 巧家县| 柞水县| 勐海县| 马边| 吴忠市|