Dates formatted Differently on another pc

rporter45
rporter45 used Ask the Experts™
on
Good afternoon!  I have a 10 year fiscal evaluation report - I have created formulas for each year

if month ({?Current Fiscal Year Date To}) >= 7 then "FY"& totext ( year ({?Current Fiscal Year Date To})+1)
else  "FY" & totext (Year ({?Current Fiscal Year Date To}))

On my pc they are FY2017 but on another person's pc they return a value of FY2017.00

I've never seen this before - any help would be appreciated!

thanks - CS
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Check the WIndows setting.  Crystal uses the Windows default settings for number and date formats

You can avoid the problem by adding a formatting string to the ToText function

if month ({?Current Fiscal Year Date To}) >= 7 then 
           "FY"& totext ( year ({?Current Fiscal Year Date To})+1, 0, '')
else  
           "FY" & totext (Year ({?Current Fiscal Year Date To}), 0, '')

Open in new window


The 0 says format with 0 decimal places.
The '' says use nothing for the thousands separator

Another one that would work is
if month ({?Current Fiscal Year Date To}) >= 7 then 
           "FY"& totext ( year ({?Current Fiscal Year Date To})+1, '0')
else  
           "FY" & totext (Year ({?Current Fiscal Year Date To}), '0')

Open in new window


mlmcc

Author

Commented:
Worked perfectly! thanks very much!
cs

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial