Trouble displaying date with no year. (1 Viewer)

Lkwdmntr

Registered User.
Local time
Today, 04:15
Joined
Jul 10, 2019
Messages
277
Hello,
I am having trouble getting a date formatted correctly. I just want the mm/dd to show in parenthesis. ie: (3/9)

It was working when I created the text boxes, but when I went to display the forms it didn't work.

In the control source, I am using a temp variable "TmpStartDate" and then adding 7 to each text box for each week.

=([TempVars]![TmpStartDate]+7) and then in the properties "Format" im using mm/dd

Any help would be appreciated
 

Gasman

Enthusiastic Amateur
Local time
Today, 11:15
Joined
Sep 21, 2011
Messages
14,038
Are you sure [TempVars]![TmpStartDate ] has a value?
I have just tried Date in a test form of mine with that format and it works fine?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:15
Joined
Feb 19, 2013
Messages
16,553
but when I went to display the forms it didn't work.
what does didn't work mean? you get an error? Wrong format/result? something else?

I just want the mm/dd to show in parenthesis. ie: (3/9)
so why are you using mm/dd? You need to use (mm/dd)
 

Lkwdmntr

Registered User.
Local time
Today, 04:15
Joined
Jul 10, 2019
Messages
277
I am positive. I am using the Start Date on the form I'm working with and it shows up in that field.
 

Lkwdmntr

Registered User.
Local time
Today, 04:15
Joined
Jul 10, 2019
Messages
277
I'm getting an #Type! in the text box instead of the date. I tried the (mm/dd) and took of the parenthesis in the control source and it is ignoring the format. It's putting it with the year.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:15
Joined
Feb 28, 2001
Messages
26,996
When you see #Type in anything, there is a disconnect between the object that was presented and way in which it was used. If you are trying to output something in a manually formatted date, that something MUST be in Date/Time format. Therefore, your error says you have presented something the wrong way, something that isn't a date as input.
 

Lkwdmntr

Registered User.
Local time
Today, 04:15
Joined
Jul 10, 2019
Messages
277
I figured it out.

=Format(DateAdd("d",7,[TempVars]![TmpStartDate]),"(mm/dd)")
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:15
Joined
Feb 19, 2013
Messages
16,553
you just need to put it in the property for the control - Perhaps that does not matter but using the format function converts it to text.
 

Lkwdmntr

Registered User.
Local time
Today, 04:15
Joined
Jul 10, 2019
Messages
277
you just need to put it in the property for the control - Perhaps that does not matter but using the format function converts it to text.
I thought so too, but it still put the year on. This solution is working well. Thanks for the help.
 

Users who are viewing this thread

Top Bottom