個小朋友分一個蛋糕,只准切三刀,要怎樣才能平分?
sql server - Getting only Month and Year from SQL DATE - Stack Overflow老師問小朋友5個小朋友分一個蛋糕,只准切三刀,要怎樣才能平分?一堆小朋友搶著說把蛋糕切成三等份,正好三刀~正當老師準備公佈答案時艋舺的和尚同學,突然天外飛來一語:一刀砍死一個小朋友,剩兩刀把蛋糕切成四等份~~~~老師.....無言I need to access only Month.Year from Date field in SQL Server. . ... I am interpreting your question in two ways. a) You only need Month & Year seperately in which case here is the answer select [YEAR] = YEAR(getdate()) ,[YEAR] = DATEPART(YY ......
全文閱讀