Focal Point
TRUNC in WEBFOCUS ?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4931071242

August 16, 2007, 06:59 AM
<Navin>
TRUNC in WEBFOCUS ?
Hi
Is there any equivalent function in WEBFOCUS as that of TRUNC in ORACLE.

Thanks
Naveen.
WF 7.1.6
August 16, 2007, 07:05 AM
Tewy
What are you trying to do?


WF 7.6.11
Output: HTML, PDF, Excel
August 16, 2007, 07:23 AM
<Navin>
i am trying to get the system date and calculate the previous month's start date.

I was trying with the ORACLE query , taking the sysdate , truncating it for the previous month.

But i want to bypass the database hit . . .

so i am using the today() function of webfocus to get the sysdate.After that i want to calculate the start date of the "Previous quarter" or the "previous month"
So i was looking for the TRUNC like function . . .

Thanks
Naveen.
WF 7.1.6
August 16, 2007, 07:28 AM
<JG>
WebFocus Reporting does not have an equivalent of TRUNC that can be used in DEFINE or COMPUTE.


However you can do the equivalent using formating options for your output

For instance if you have a column called ORIGINAL with a format of D10.6 and a value of 123.123456

PRINT ORIGINAL ORIGINAL/D10.1

would produce 123.123456 123.1

as its output
August 16, 2007, 07:36 AM
<JG>
Sorry Navin you want the other use of trunc

use the DATEMOV subroutine it does the equivalent
August 16, 2007, 07:49 AM
<Navin>
JG . ..

Thanks for the DATEMOV function . . that works well for me .

Thanks
Naveen.