A Bug warning

Bruce Easton bruce at stn.com
Sat Jun 17 22:53:25 PDT 2017


Yeah - this issue was noted before. Where the online manual says a date 
function's argument should be a 'date expr', what is meant is that they 
should be fields that already have date edits, not any literal which is 
uncast.  Note that the same behavior you experienced happens regardless 
of the fact that the value was passed.  You could, in processing, simply 
have:

Then: StartDate=BOM("08/15/2017")

and it will still return the first day of the current month. Perhaps the 
online manual should describe the argument as 'date_field' instead of 
'date_expr' to avoid confusion with other functions  where 'expr' could 
mean uncast expressions that are appropriate.


On 6/15/17 10:30 PM, Richard Kreiss via Filepro-list wrote:
> I found the following bug, which has been reported to FPSUPPORT.
>
> When passing a date field using a -r variable, and then doing a date function using the received @p_ value, the month is always the current month.
>
> Example:
>
> Declare fdate(10,mdyy/)
> Fdate="08/15/2017"
>
> Doit="\fp\rreport foobar -f fooReport -v sel_foo -rx Fdate -a -u"
>
> System doit
>
> Debugger on in sel_foo
>
> Declare StartDate(10,mdyy/),EndDate(10,mdyy/)
>
> StartDate=BOM(@px);EndDate=EOM(@px)
>
> When checking the value of @px, it will show as 08/15/2017. However, checking the value of StartDate, it will be 06/01/2017 and enddate will be 06/30/2017.
>
> To get around this problem I added the following px(10,mdyy/)=@px (px has the correct dates).
>
> Then: StartDate=BOM(px);EndDate=EOM(px) (Dates are correct)
>
>
> Richard Kreiss
> GCC Consulting
>
>
>
>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: winmail.dat
> Type: application/ms-tnef
> Size: 13774 bytes
> Desc: not available
> URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20170616/fa35e6e0/attachment.bin>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Filepro-list mailing list