Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom date format 1

Status
Not open for further replies.

ARJakhu

Technical User
Sep 8, 2002
8
GB
HELP!

I need to display a date from a query field on my report in the following format:

00038BD************dd*mm*yyyy**********BD*

I have tried to achieve this by creating a text box in the report for the date field from the query. I put the following line in the format line in the properties for the text box:

"00038BD************"dd\*mm\*yyyy"**********BD*"

The big problem I keep hitting is that I can't seem to shake the \ date separator. When I come out of design view, just the date is displayed in the format dd/mm/yyyy.

I have also tried using the datepart function in the query design for this field. This works apart from the fact I can only specify "d" and "m" in the datepart function instead of "dd" and "mm".

CAN ANYONE HELP BEFORE THIS DRIVES ME MAD........ PLEASE!

Ram
 
Set up an expression in your query something like this:
Code:
FormattedDate: "00038BD************" & Format(DatePart("m",[YourDate]),"00") & "*" & Format(DatePart("d",[YourDate]),"00") & "*" & DatePart("yyyy",[YourDate]) & "**********BD*"

This will work assuming the characters at the beginning and end are hardcoded.......
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top