Topic Options
#7175 - 07/07/06 12:14 AM Date String in Financial Reporter
Ken A. Offline
Adagio Maestro

Registered: 09/14/01
Posts: 1009
Loc: Kamloops, BC
I am trying to create a string that returns the date as follows:

March 31, 2006 with comparative figures for 2005

Presently I can get everything except the year 2005. I only know how to get 2006 to show up. The formula I have in at this point is:

=DATESTRING(ADGETF("gldates.END",FPRIOR(0)),"%B %d, %Y with comparative figures for %Y")

I know the %Y is wrong, but what do I need to do to get the prior year (that is 2005).
_________________________
Thanks,

Ken Aberdeen,CPA, CMA
Aberdeen Business Consulting Ltd.
ken@aberdeenconsulting.ca

Top
#7176 - 07/07/06 12:02 PM Re: Date String in Financial Reporter
Softrak Support Offline

Adagio Action Team

Registered: 03/09/99
Posts: 11532
Loc: Vancouver, BC Canada
Hi Ken,

The DateString function is simply to apply formatting to a particular date, such as Mar 31, 2006 in your case. If you want to include the prior year 2005 with your text, you have to calculate it.

The function to take the year from a date is YEARL, and subtract 1 from the result. You then have to convert this number to a string to include it with the rest of the text. The formula to do this is:
=STRING(YEARL(ADGET("gldates.END",FPRIOR(0)))-1,0)

So to add to the rest of what you previous posted, a formula to get what you want is:
=DATESTRING(ADGET("gldates.END",FPRIOR(0)),"%b %d %Y with comparative to ") & STRING(YEARL(ADGET("gldates.END",FPRIOR(0)))-1,0)
-----
An alternate way to get a date 12 fiscal periods prior to the one selected from the toolbar is to change the function parameter from 0 to 12:
=ADGET("gldates.END",FPRIOR(12))

This would give a second way to get the year:
=STRING(YEARL(ADGET("gldates.END",FPRIOR(12))),0)
_________________________
Regards,
Softrak Tech Support

Top


Moderator:  Christa_Meissner 
Who's Online
0 registered (), 56 Guests and 1 Spider online.
Key: Admin, Global Mod, Mod
Forum Stats
1865 Members
5 Forums
14458 Topics
70633 Posts

Max Online: 432 @ 01/20/25 10:17 PM
April
Su M Tu W Th F Sa
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30