Zeros preceding a number

K

Kevbro7189

I have this text field in a form which takes a date and displays the Julian
date of that date.

Jan 1 = 1
Feb 1 = 32
Mar 1 = 60
And so on. The text fields data is "=DatePart("y",[Date])." My problem I
need help with is I want that 1(Jan 1) to be displayed as 001, and 32(Feb 1)
to be displayed as 032. Can anyone help?
 
S

Stuart McCall

Kevbro7189 said:
I have this text field in a form which takes a date and displays the Julian
date of that date.

Jan 1 = 1
Feb 1 = 32
Mar 1 = 60
And so on. The text fields data is "=DatePart("y",[Date])." My problem I
need help with is I want that 1(Jan 1) to be displayed as 001, and 32(Feb
1)
to be displayed as 032. Can anyone help?

=Right$("000" & DatePart("y",[Date], 3)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top