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!

trim date field in formula field 1

Status
Not open for further replies.

cjbrown815

IS-IT--Management
Mar 2, 2006
525
US
Hello,
I have a formula field that's pulling in the date field and a text field. The I put that formula field in as a variable in a line graph. It's the "On change of" field. Basically the scientist wants to see both the production date {SAMPLE.DATE1} and the load number {SAMPLE.TEXT3}, so I did a formula to pull the two together. the problem is, this is a datetime field. How can I get it to show just the date and load#? thanks

FORMULA
{SAMPLE.DATE1} & {SAMPLE.TEXT3}

-CJ

SQL2005// CRXIr2// XP Pro

"Progress lies not in enhancing what is, but in advancing toward what will be"
-KHALIL GIBRAN 1883-1931
 
If the problem is that it shows the time, then try
Code:
ToText({SAMPLE.DATE1}, "dd/MMM/yyyy") &  {SAMPLE.TEXT3}
That formula would show today as 11/SEP/2009: all sorts of other options exist with ToText.

I've not used this option with graphs but it should be OK.

PS. You could also truncate the text if it was sometimes too long, e.g. Left({SAMPLE.TEXT3},5) to show just the first five letters.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
That worked beautifully, thanks Madawc

-CJ

SQL2005// CRXIr2// XP Pro

"Progress lies not in enhancing what is, but in advancing toward what will be"
-KHALIL GIBRAN 1883-1931
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top