Hi Geeks!,

I need help. I want to format label's text into date but the value of my label is fetched from the database so I shouldn't use Now() function. ex. 7/31/2010 would be July 17, 2010.


Thanks in Advance Guys!

I'm confused. What label? Which database? Is this the right forum for this question?

Hi WHchaz1027

This problem is relatively easy to solve. griswolf probably misunderstood it and to answer his question I think it would have been better placed in the MS Access and FileMaker Pro Forum.

Anyway to solve your problem you need to use an unbound text box to display the date as a label's text is read-only and can't be edited, whereas the data inside an unbound text box can be changed. In order to display the date in the format you want you need to use the Format command in the control source of the unbound text box like so

=Format([[I]Your Date[/I]]),"mmmm dd" & ", " & "yyyy")

Try pasting the above code into the control source of the text box and change Your Date to the actual field you want to get the date from.

To make the text box look like a label you could do the following:

  • Set the Border Style property of the text box to Transparent
  • Set Enabled property to No so that is read only
  • Set Locked property to Yes so the data in it can't be edited and the text box isn't grayed out as it isn't enabled.

I hope this solves your problem and if you need anymore assistance let me know.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.