我如何...我正在使用MS Acess我使用DateAdd功能 [英] How do I...I am using MS Acess I wand to use DateAdd function
问题描述
我正在使用MS Acess我想使用DateAdd函数获取日期列,下一个月将选择日期
Ex如果我有20/1 / 2015选择之后它将给出2015年2月20日
选择employee.emp_id,DateAdd(mm,1,employee.join_date)作为员工的val
这将给予价值
empid val
1 #Error
2#错误
请帮帮我
I am using MS Acess I want to use DateAdd function for fetching the date column with which will select with next month date
Ex If I have 20/1/2015 after selection it will give as 20/2/2015
select employee.emp_id, DateAdd("mm",1, employee.join_date) as val from employee
which will giving value as
empid val
1 #Error
2 #Error
please help me
推荐答案
没问题,看看这里: DateAdd功能(MS Access) [ ^ ]
用法:
No problem, have a look here: DateAdd function (MS Access)[^]
Usage:
SELECT DateAdd ("m", 1, #20/01/2015#) AS NewDate
注意:您应该使用ISO格式作为日期: mm / dd / yyyy
如果您想获得正确的输出;)
Note: You should use ISO format for date: mm/dd/yyyy
if you want to get correct output ;)
SELECT员工.emp_id,DateAdd(m,1,employee.join_date)AS来自员工的新日期
这将工作先生谢谢
SELECT employee.emp_id, DateAdd ("m", 1, employee.join_date) AS NewDate from employee
this will working sir Thank you
这篇关于我如何...我正在使用MS Acess我使用DateAdd功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!