Skip to Content
0
Former Member
May 12, 2008 at 11:22 PM

Covnert date to just YYYYMM

515 Views

Post Author: Deepa

CA Forum: Formula

I am new to this forum. I have a report where I need to create a date variable that shows just YYYYMM. I have a client who needs a line graph with three layers. First sort is year, second sort is month and third sort is offices giving him total of all payable expenses. The Crystal Reports chart options gives me only two layers and not three. So I need to create a variable that shows year and month that I can sort by. I have two seperate variables for year and month. If I write a formula to add them, I get a numerical vaule of the total of the two. If I convert them to string and add them, i do get the results closer to what I need but the month shows as 7 for july and 10 for October and the resulting string value puts October before July in the same year.

How can I truly get a variable that will allow me to get a true YYYYMM which is like 200707 value that can be sorted by the report writer. This will give me the graph that my client needs. Any help is truly appreciated. Thank you. Deepa