kmcinc
4th August 2011, 19:31
I am using function 'utc.num()' in my program script but Baan is not able to compile it, saying that there is no reference to this function. Is there an include that I'm missing?

bdittmar
4th August 2011, 21:23
I am using function 'utc.num()' in my program script but Baan is not able to compile it, saying that there is no reference to this function. Is there an include that I'm missing?

Hello,
how do you use the utc.num() ?

No need for additionals.

Something like:

tablefield.date = utc.num()

fills the tablefield from type UTC with current date/time

Be more specific, please.

Regards

kmcinc
4th August 2011, 22:31
Bernd, that's exactly what I'm doing:
date.str = utc.num()

Very simple but it's not compiling, giving an error message for that line "Error: Unresolved reference to function 'utc.date'."

vinceco252
5th August 2011, 03:51
I don't remember the specific solution, but you do have to install a solution or be at a certain tools level to gain any UTC functionality (if I am remembering right...).

Vince

BaanInOhio
5th August 2011, 06:09
Baan IV? I was able to use some UTC functionality in Baan IV but the arguments were a bit different than what is used in Baan V.

I thought that utc.num() returned a long, not a string.

You need to use utc.to.date to get the long utc number to a date and time (numbers). utc.to.input or utc.to.inputstr$ can provide a string from the utc long number.

These should be available in Baan IV as part of the bshell, so shouldn't require an include statement. What is your tools level/version?

kmcinc
5th August 2011, 17:22
Porting set is 6.1c.07.13. And you're right: utc.num() does return a long.

kmcinc
5th August 2011, 17:59
I just tried using utc.to.input, and it appears the system "knows" about this function. It gave me an error about arguments but not about an unresolved reference. However, I did not find any documentation about utc.to.input, not in the manual pages or the help file in 'c:\program files\Infor\BW\Baan IV\help\B40Sc4\tt2.hlp'. This raises the question how do I find out which functions are available in our version of Baan IV.

BaanInOhio
5th August 2011, 18:49
Trial and error. See my post (2nd down) for an example of the differences between the UTC functions in IV and V/LN:

http://www.baanboard.com/baanboard/showthread.php?t=50785

This probably falls under the same category. I simply created a test script using the UTC functions and kept adding/substituting variables into the calls until I figured out what Baan was asking for. Most documentation (programmer's manual) covers the UTC calls for Baan V. Baan IV's are a bit different. I will try to find my results of the UTC.NUM call.

kmcinc
5th August 2011, 19:25
I opened a case with Infor about this. When I hear from them I'll update this post.

bdittmar
5th August 2011, 19:37
I just tried using utc.to.input, and it appears the system "knows" about this function. It gave me an error about arguments but not about an unresolved reference. However, I did not find any documentation about utc.to.input, not in the manual pages or the help file in 'c:\program files\Infor\BW\Baan IV\help\B40Sc4\tt2.hlp'. This raises the question how do I find out which functions are available in our version of Baan IV.

Hello,
BaanERP Programmers Guide

utc.to.input()

--------------------------------------------------------------------------
Syntax
string utc.to.input( long lvalue, const string format() )

Description
This converts a UTC long format value to an input date string or an input time string (in local time). The format specified determines whether the function returns a date string or a time string.

Arguments
lvalue A UTC long format value.

format The format for the input string.

For a UTC date, use the substitution symbols %uxxx[,lang] or %u(format). For a UTC time, use the substitution symbols %Uxxx[,lang] or %U(format).

Return values
0 Success.
-1 Error.

Regards