문제

I would like to know how to truncate a date when using the Now() function to avoid having hours seconds and minutes. Effectively I would would like to show only dd/mmm/yyyy.

My current code which is:

[Expected start date] = Now()

is returning in the field box:

13/04/2014 22:24:10

When i wish it would only return

13/04/2014

I imagine this may be simple for most but I am a beginner.

도움이 되었습니까?

해결책

How about using Format. You really don't want to set the Expected start date field to a date, but instead a string.

Format(Now(),"dd/mm/yyyy")
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top