开发者

Current date, current month?

Iam trying to display a create date unless the create date is in the current month - then I would like to say "New Record" but someting is wrong with my formula a开发者_开发知识库s I am getting an error saying "a date is required here" but I just want the system to validate whether the create date is in the current month - I don't want to modify this report every 1st day of the month - is that possible? Thanks in advance for your help.

if ({SyndMail_Errors.Create Date} = Month(currentdate())) then "New Record" else {SyndMail_Errors.Create Date}


Try this:

DateVar FirstDate := Date(year(CurrentDateTime), month(CurrentDateTime), 1);
if ({SyndMail_Errors.Create Date} >= FirstDate) then "New Record" else
    ToText({SyndMail_Errors.Create Date},"MM/dd/yyyy")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜