I am sorry it was TYPING MISTAKE i am using $i < 10, it fail at clock scan
My Code is :
for {set i 0} {$i < 8} {incr i 1} {
set testDate [clock format [clock scan "$mDt + $i days"] -format
"%Y%m%d" ]
}
When the value of mDt is 20010427 it works well, but when it changes to
20010429 it fails
It fails saying
Error: unable to convert date-time string "20010429 + 0 days"
unable to convert date-time string "20010429 + 0 days"
Sorry :-)
Prakash
-----Original Message-----
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Rob Mayoff
Sent: Friday, April 27, 2001 11:06 AM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] FORMAT DATE FAILS WHEN DATE IS OTHER THAN
SYSTEM DATE
> i am using clcok scan with ADP, and it seems like when the date variable
> passed to it is systemDate then it works but not with the date in
advance.
> for {set i 0} {i < 10} {incr i 1} {
> set testDate [clock format[clock scan "$mDt + $i"] -format "%Y%m%d"]
> }
Perhaps you should learn Tcl.
In a Tcl "for" command, you compare the value of i with ten by saying
{$i < 10}, not {i < 10}.
In Tcl, you separate the words of a command with spaces, as in
[clock format [clock scan ...]]
not
[clock format[clock scan ...]]
In a Tcl "clock scan" command, you specify an interval using the format
"number unit", as in
clock format [clock scan "20010429 + 3 day"] -format "%Y%m%d"
not
clock format [clock scan "20010429 + 3"] -format "%Y%m%d"
> IT DOES NOT WORK WHEN THE VALUE OF mDt IS CHANGED FROM THE SYSTEM DATE.
Once again you have posted an essentially useless complaint, this time
that "it does not work", and you have done so in all caps to be sure
that you really piss us off.
You could post useful information, such as the exact error message that
appeared on your screen or in your server log, but you choose not to.
Apparently you want to make it harder for us to help you.
> the value of mDt is 20010429 and todays date is 20010427 IR
FAILS..........
> ANY IDEA???????/
I have the idea that all you do by writing in all caps is piss off those
who could help you. If anyone on the list likes the all-caps style,
please correct me.