上月25號
=cdate( "#" & year (dateadd("d",-1, cdate("#" & year(today).ToString & "/" & month(today).ToString & "/1#"))).ToString & "/" & month(dateadd("d",-1, cdate("#" & year(today).ToString & "/" & month(today).ToString & "/1#"))).ToString & "/25#")
本月1號
=cdate("#" & year(today).ToString & "/" & month(today).ToString & "/1#")本月底
=DateAdd("d",-1,DateAdd("m",1,cdate("#" & year(today).ToString & "/" & month(today).ToString & "/1#")))
今日
=cdate("#" & year(today).ToString & "/" & month(today).ToString & "/" & Day(today).ToString & "#")
上月最後一天
=DateAdd("d",-1,cdate("#" & year(today).ToString & "/" & month(today).ToString & "/1#")) 去年1/1
=cdate("#" & year(dateAdd("yyyy",-1,today)).ToString & "/" & "1/1#")
去年12/31
=dateadd("d",-1,cdate("#" & year(today).ToString & "/" & "1/1#"))
使用Oracle native driver時,直接where column_name operator :parameter_name 即可
沒有留言:
張貼留言