markerpln
18th March 2010, 05:24
Assign date and time

Sir i need a help that i want to assign a specific date and time into whinr110.trdt..

ex of my codes..


domain tcqdhc jan
domain tctrns.date jandate

domain tcqdhc feb
domain tctrns.date febdate

after.whwmd215.item.1:
before.layout:

|January date
jandate = 01-31-2010 23:59

select whinr110.qhnd,whinr110.trdt
from whinr110 |where whinr110.trdt < :trdt.f
where whinr110.trdt <= :jandate
and whinr110.cwar={:whwmd215.cwar}
and whinr110.item={:whwmd215.item}
selectdo
jan=whinr110.qhnd |ENDING INVENTORY of the Month January
endselect


|February date
febdate = 02-31-2010 23:59

select whinr110.qhnd,whinr110.trdt
from whinr110 |where whinr110.trdt < :trdt.f
where whinr110.trdt <= :febdate
and whinr110.cwar={:whwmd215.cwar}
and whinr110.item={:whwmd215.item}
selectdo
feb=whinr110.qhnd |ENDING INVENTORY of the Month February
endselect

the report is just like this

ENDING INVENTORY PER MONTH
|January|February|
| 2000 | 3000 |

Thnxs,,

The problem is my statement is not working..need help for the codes..

NirajKakodkar
18th March 2010, 06:24
Use the below function convert the jandate/febdate to utc long format and then use it in your select query.

function long inputstr.to.utc (const string date.inputstr(), string date.format(7), const string time.inputstr(), string time.format(7))


Best Regards,
Niraj

markerpln
18th March 2010, 06:35
thnxs sir,

ill do the code like these,but its not working..

domain long january
january = inputstr.to.utc("01-31-2010",%u002,"23:59:59",)

select whinr110.qhnd,whinr110.trdt
from whinr110
where whinr110.trdt <= :january
and whinr110.cwar={:whwmd215.cwar}
and whinr110.item={:whwmd215.item}
selectdo
jan=whinr110.qhnd |ENDING INVENTORY of the Month January
endselect

ill try that function but has an error sir.
the error is ::
rwhinrndsirmb10( 534): Error: Illegal char ASCII: % (37)
rwhinrndsirmb10( 534): Error: 'ILLEGAL CHAR' not expected.

can u gave me an example to do the function??