I know how to get the month its ..... Trim(Month(Now)) .... but that displays a 4 (this month). I want it to display a 04 for any month under 10 and everything over display regularly. Example: 01,02,03,04,05,06,07,08,09,10,11,12?
it would be simpler to use <b><font color=red>datepart</font></b> and the <b>now()</b> function:<br><i><b>datepart ("mm", [now()] ) </b></i><br><br>or format your date field(s) mm (a single 'm' will not provide the leading zero)
I have tried to incorporate this function into my existing one with no success. Can anyone help me? This is what I have so far. I want to change the Trim(Month(Now())) to the suggested style above.<br><br><br>User.Text = "00" & Trim(Month(Now())) & Trim(Day(Now()))
User.Text = Format$(Now(),"yymmdd"<br><br>I'm assuming that the 00 is for the year 2000.<br><br>If the 00 has to be there even in 2001, then<br>User.Text = "00" & Format$(Now(),"mmdd"<br>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.