so how did you do it?
- Original Message -
From: Prakash Sinha [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 27, 2001 1:00 AM
Subject: Re: [AOLSERVER] DateAdd
sorry to bother, i got done THANK U SO MUCH
-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Prakash Sinha
Sent: Thursday, April 26, 2001 12:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] DateAdd
Hey Dossy,
I tried it, it works GREAT but not with -format %m%d%Y option
If i try
set testDate [clock format [clock scan $mDt + 6 days]]
it works, but, when i try to format the output
set testDate [clock format [clock scan $mDt + 6
days] -format %Y%m%d]
it does not?
Any idea!!
Prakash
-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Dossy
Sent: Tuesday, April 24, 2001 10:34 PM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] DateAdd
The one-liner version of Ricard's example:
clock format [clock scan {04/24/2001 + 5 days}] -format %m/%d/%Y
- Dossy
On 2001.04.24, ricard helene [EMAIL PROTECTED] wrote:
Here is the quick and dirty way I do it in tcl:
convert the properly formatted initial date to seconds
with 'clock scan'
convert the interval being added into seconds
add the two values, use 'clock format' to put that
value into a date format.
ex.
[
set initialDate '04/24/2001'
# i want 5 days added which is 432000 seconds
set interval 432000
set newDate [clock format [expr [clock scan
$initialDate] + $interval] -format %m/%d/%Y]
]
There are some other ways to do it with clock scan and
relative time -- check the tcl docs...
As you can see, this is in no way 'elegant' or even
'good', but has done the job for me. Hope it helps
somehow.
Yes, tcl is smart.
--- Prakash Sinha [EMAIL PROTECTED] wrote:
Is there any function which works to add two dates
or add a day to the date?
If anybody has any idea, share that with me!!!
Prakash
=
Are you going to spend the rest of your life selling sugar water, or
are
you going to come with me and change the world?
__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
--
Dossy Shiobara mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/