vyp_007
15th December 2006, 14:38
Hi,

I need to get year from current Date in Baab IVC4. Using what function or code is it possible to do the same.

Regards,

VYP

bdittmar
15th December 2006, 15:05
Hi,

I need to get year from current Date in Baab IVC4. Using what function or code is it possible to do the same.

Regards,

VYP


num.to.date()

--------------------------------------------------------------------------------

Syntax
long num.to.date( long dayno, ref long yearno, ref long monthno, ref long month_dayno )

Description
This converts a specified number of days since 01-01-0001 to the corresponding year, month, and day of the month.

Return values
0 Success.

-1 Error.

Regards

george7a
15th December 2006, 15:31
Hi,

You can use the dte$() function (http://www.baanboard.com/programmers_manual_baanerp_help_functions_date_time_zones_dte) to get the current date in string.
date.str = dte$()
year = lval(date.str(5;2))+2000

I hope it helps,

- George