Good Morning,
I have a formula that is for a title on a report, however, I'm having trouble formatting the year in this. Database is SQL Server.
______________Start Formula_____________
StringVar MO:=["January","February","March","April","May","June","July","August","September","October","November","December"]
[Month({@Call Date for Select})];
StringVar YR:=ToText(Year({@Call Date for Select}),"0000",0);
"Calls to Campus Emergency Phones in " + MO + ", " + YR
_______________End Formula______________
The formula @Call Date for Select takes a date/time field in the database and converts it to date only. It is then used in the select statement, where it is "in the period" of the "last full month"
I am getting the results that I want, except the year is coming out as 2,010 and I want 2010, of course.
I've done this formatting before but can't seem to make this work.
ALso, I'm running the report in an automated report program, not Crystal, so while I can change the number format in Crystal to eliminate commas, I don't have this control in the product that I'm using to automate the report, so I need to format out the comma in the RPT file itself.
Thanks for all help!
I have a formula that is for a title on a report, however, I'm having trouble formatting the year in this. Database is SQL Server.
______________Start Formula_____________
StringVar MO:=["January","February","March","April","May","June","July","August","September","October","November","December"]
[Month({@Call Date for Select})];
StringVar YR:=ToText(Year({@Call Date for Select}),"0000",0);
"Calls to Campus Emergency Phones in " + MO + ", " + YR
_______________End Formula______________
The formula @Call Date for Select takes a date/time field in the database and converts it to date only. It is then used in the select statement, where it is "in the period" of the "last full month"
I am getting the results that I want, except the year is coming out as 2,010 and I want 2010, of course.
I've done this formatting before but can't seem to make this work.
ALso, I'm running the report in an automated report program, not Crystal, so while I can change the number format in Crystal to eliminate commas, I don't have this control in the product that I'm using to automate the report, so I need to format out the comma in the RPT file itself.
Thanks for all help!