[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] SQR Informix date format



Did you declare $convInsDate as a date variable?  If you didn't, then SQR
will "autoconvert" the date returned from the function into a string to
store it in the string variable $convInsDate.

On Tue, 20 Sep 2005, Jeet wrote:

> Hi All,
> I am writing a SQR report with Informix as database. 
> 
> When I am inserting a row into the table thru the SQR,
> the Informix is not accepting the date. For example, 
> 
> let $insertDate = '09/20/2005' 
> 
> Insert into ps_sample_table 
> (Setid,
> Effdt,
> Name,
> Age)
> Values
> ('Share',
> $insertDate,
> 'John',
> '25')
> 
> It always throws an error as follows
> 
> "(SQR 5528) INFORMIX SQL EXECUTE IMMEDIATE error ".
> 
> I tried changing the date variable in different
> datatype as follows 
> 
> let $convInsDate = datetostr($insertDate,'MM/DD/YYYY')
> or
> let $insertDate = '2005-MM-DD'
> let $convInsDate = datetostr($insertDate,'YYYY-MM-DD')
> 
> and tried inserting using the $convInsDate variable.
> But for some reason, it always errors out giving the
> same reason.
> 
> Can anyone shed some light on this problem I am
> facing. I will appreciate any suggestions you might
> have. 
> 
> Thanks a lot in advance. 
> 
>             - Jeet. 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
> 

-----------------------------------------------------------------------
Donald Mellen  | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
donm@ontko.com |  "In the beginning, there was nothing, which exploded"


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users