如何从以下值获取月份名称" 2016-04-01 15:16:00.000"
我使用了以下SQL:
def destroy
@cliq = Cliq.find_by(params[:cliq_id])
@cliq_membership = CliqMembership.find(params[:id])
@cliq_membership.destroy
flash[:notice] = "You left the Cliq."
redirect_to cliqs_path
end
答案 0 :(得分:2)
将日期传递给datename,而不是月份编号......
DATENAME(mm, [MyDate])