#147301 - 2005-09-07 10:17 PM
DateAdd Problem
|
Darkwin
Fresh Scripter
Registered: 2003-01-04
Posts: 12
Loc: Assen, The Netherlands
|
I have a problem to add a nummer to the date.
sample: 7-09-2005 + 4 = 11-09-2005
my code is Code:
$1 = 7 - @WDayNo
$ZatDay = @DATE + $1
? $ZatDay
Edited by Darkwin (2005-09-07 10:18 PM)
|
|
Top
|
|
|
|
#147303 - 2005-09-07 10:40 PM
Re: DateAdd Problem
|
Darkwin
Fresh Scripter
Registered: 2003-01-04
Posts: 12
Loc: Assen, The Netherlands
|
I have a VBS code and want to convert it to kix
this is de VBS code Code:
Dim datum, MyWeekDay, NewDate
datum = Date
MyWeekDay = WeekDay(Datum)
WScript.Echo "WeekDay: " & MyWeekDay
ZatDat = DateAdd("d", 7 - WeekDay(Datum), Datum)
WScript.Echo "DateAdd: " & ZatDat
|
|
Top
|
|
|
|
#147309 - 2005-09-09 11:33 AM
Re: DateAdd Problem
|
CJPinder
Lurker
Registered: 2005-09-08
Posts: 4
|
I think the UDF you need is SerialDate. Use it to convert your date into a number, add to it the required number of days and then use SerialDate again to convert the number back into a date string.
Regards, Christian.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 781 anonymous users online.
|
|
|