[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: DateAdd / StrToDate problem.
thanx!
-----Original Message-----
From: Discussion of SQR, Brio Software's database reporting language
[mailto:SQR-USERS@list.iex.net]On Behalf Of Peter Clark
Sent: Friday, 11 January 2002 12:35 AM
To: SQR-USERS@list.iex.net
Subject: Re: DateAdd / StrToDate problem.
You need to declare $TempDate as a date variable and build your string date
in a different variable i.e.
begin-setup
declare-variable
date $TempDate
end-declare
end-setup
then
Let $MyMonth = '200111'
Let $TempDateIn = $MyMonth || '01'
Let $TempDate = strtodate($TempDateIn, 'YYYYMMDD')
Let $TempDate = DateAdd($TempDate, 'month', -6)
Let $HalfYear = DateToStr($TempDate, 'YYYYMM')
>>> Jarrodb <jarrodb@NETSPACE.NET.AU> 2002/01/10 8:23:56 am >>>
Hi all!
Hoping someone can help.
I am trying to use the dateadd as seen below but are
getting the following errors.
Any tips would be greatly appreciated,
thanx.
Let $MyMonth = '200111'
Let $TempDate = $MyMonth || '01'
Let $TempDate = strtodate($TempDate, 'YYYYMMDD')
Let $TempDate = DateAdd($TempDate, 'month', -6)
Let $HalfYear = DateToStr($TempDate, 'YYYYMM')
Error on line 78:
(SQR 4045) Function or operator 'dateadd' requires date argument.
Error on line 79:
(SQR 4045) Function or operator 'datetostr' requires date argument.
Errors were found in the program file.
SQR: Program Aborting.