質問

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