Another way to get last month is to take
the first of the current month and subtract 1 day. (This also works to calculate the last
day of last month.)
<@days date=<@currentDate
format=”datetime:%m/1/%Y”> days=-1
format=”datetime:%b”>
Dave.
-----Original
Message-----
From: Steve Smith
[mailto:[EMAIL PROTECTED]
Sent: December 16, 2003 6:58 AM
To: [EMAIL PROTECTED]
Subject: Re: Witango-Talk:
Formating Variables
I've got the logic to handle January, it was the
/1/year that I was forgetting. It was the end of a long day and it is now the
beginning of another long day but the brain has had some sleep so this makes
sense.
Thanks for your help,
Steve Smith
Oakbridge Information Solutions
Office: (519) 624-4388
GTA: (416) 606-3885
Fax: (519) 624-3353
Cell: (416) 606-3885
Email: [EMAIL PROTECTED]/color>
Web: http://www.oakbridge.ca/color>
On Monday, December 15, 2003, at 10:44 PM, Customer Support wrote:
Steve,
Try:
<@ASSIGN/smaller>/color>
request$r_month/color> VALUE=/color>'/color><@CALC/color>
EXPR=/color>"/color><@CURRENTDATE/color>
FORMAT=/color>'datetime:%m'/color>>/color>
- 1"/color>>/color>/1/2003'/color>>
/color><@VAR/color> REQUEST$r_month/color>
FORMAT=/color>'datetime:%b'/color>>
/color>/smaller>/fontfamily>It is a little primitive if you are trying to
find "Last Month" as it will not find Dec if you are in Jan. Make
sure you format the date in the default date format for your server.
Witango Support
On 16/12/2003, at 2:25 PM, Steve Smith wrote:
I'm sure that I've used the FORMAT attribute on
variables before with success. I'm using the following lines of code on Witango
Mac OS X build 062:
<@ASSIGN/smaller>/color>
NAME=/color>"r_month"/color>
VALUE=/color>'/color><@CALC/color>
EXPR=/color>"/color><@CURRENTDATE/color>
FORMAT=/color>'datetime:%m'/color>>/color>
- 1"/color>>/color>'/color>
SCOPE=/color>"REQUEST"/color>>
/color><@VAR/color> NAME=/color>'REQUEST$r_month'/color>
FORMAT=/color>'datetime:%b'/color>>
/color>
/smaller>/fontfamily>and I'm expecting to see 'Nov.' as the result. Instead
I see '11'. Am I:
a) trying to do the impossible
b) seeing a bug
c) using code with a typo in it
d) just overtired
Please let me know.
Thanks,
Steve Smith
Oakbridge Information Solutions
Office: (519) 624-4388
GTA: (416) 606-3885
Fax: (519) 624-3353
Cell: (416) 606-3885
Email: [EMAIL PROTECTED]/color>
Web: http://www.oakbridge.ca/color>