on 03-28-2009 6:41 AM
Hi All,
In my report i ahve to display the Date.
From DB i am getting 4 digit string( 2008). Using that i have to display as 08 - 09
In that i used RIGHT function. it is diplayed as 08 - 9.
when i take 2 character from right '08' is coming. Then i converted to number and added 1 to the year
But it become 9 instead of 09.
How to solve it.
Thanks in advance.
Saravanakumar.
Hi,
Shweta's answer is valid when you retrieve a date field from the database, as you have specified that you are getting a four digit string, you should use this formula.
if length(totext(tonumber(right('2008',2))+1)) = 4
then
right('2008',2)'-0'left(totext(tonumber(right('2008',2))+1),1)
else
right('2008',2)'-'left(totext(tonumber(right('2008',2))+1),2)
hope this helps!!!
Thanks
-Azhar
Edited by: Abdul Rehman Mushtaque on Mar 29, 2009 10:29 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saravana,
You can format date in Crystal report design as per your requirement.
Right click on Feild in CR design ->Format field.
Regards,
Shweta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.