markerpln
18th March 2010, 12:06
sir can u help me to use the function of inputstr.to.utc??My report script is :
UTCTime=inputstr.to.utc("01-31-2010","%D(%02m%02d%04Y)","23:59:59","%U(%02H:%02m:%02s)")
.When ill try to compile thers no error..
Then in my Layout my Domain is tc utcs for UTCTime..Then compile again..
Then when i run my report Thers nothing to view in UTCTime Field..Its just a Blank field..
can u help me pls in the function and the used domain in my report layout??
PLs help me to the function..I need this already for my report pls.....
Thnxs,,
zanza67
25th March 2010, 18:52
which is the result that you want to get
markerpln
29th March 2010, 07:29
i Want to equl my variable to the specific date for ex..
This variabl eis the ending inventory of the month,then i want my variable equal to my sql statement.
domain long UTCTime
UTCTime=inputstr.to.utc("1312010","%D(%1m%02d%04Y)","235959","%U(%02H%02m%02s)")
select whinr110.qhnd,whinr110.trdt
from whinr110
where whinr110.trdt <= :UTCTime
and whinr110.cwar={:whwmd215.cwar}
and whinr110.item={:whwmd215.item}
selectdo
jan=whinr110.qhnd / convertion
endselect
my layout look like this:
Ending inventory of the month:
January | February
3000 | 2000
can u give a sample codes for this??thnxs
and what domain that i must use in my layout for the UTCTime to see the value of my Variable??
ARijke
29th March 2010, 09:41
What if you use date.to.utc as described here: http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_date_to_utc ?
The display format does not play a role in this function. The usage of date.to.utc is more straight forward.
Regards, Adriaan
markerpln
30th March 2010, 07:33
How do i equl my date.to.utc variable to my sql?ill also try this but it's not working..i want to qual the date into the table whinh110..
ex date is:
03/31/2010 11:59pm
my variable for example is :
long utc
utc = date.to.utc( 2010, 03, 31, 23, 59, 59 )
select whinr110.qhnd,whinr110.trdt
from whinr110
where whinr110.trdt <= :utc
and whinr110.cwar={:whwmd215.cwar}
and whinr110.item={:whwmd215.item}
selectdo
jan=whinr110.qhnd / convertion
endselect
ARijke
30th March 2010, 09:58
What if you remove the {} for item and warehouse? The usage of {} is only needed for combined fields (http://www.baanboard.com/programmers_manual_baanerp_help_functions_database_handling_sql_and_combined_fields)
The usage of date.to.utc is fine.
last one: do you want to select everything before the date or only for 1 month? In that case you should add a second condition on whinr110.trdt (trdt > : utc.from)
baan1234
4th April 2010, 13:13
Hi markerpln,
The initial problem you said was the "UTC time" was not printed on report.
1) On the report layout you are using the domain "tcutcs" for the variable "UTCTime".
2) In the script you are using the domain "long" it is not correct.
Change the code something like below.
1) Check whether the variable on report "UTCTime" is declared in report input fields.
2) Declare the variable in the script as
extern domain tcutcs UTCTime
3) Assign the out put of statement date.to.utc to UTCTime.
Can you try above changes and let us know the results.
Regards
BaaN1234.