سؤال

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