smusba
1st November 2009, 12:09
Dear,

I want to convert Tdinv100.trdt to String format in Report layout. Kindly,show me with example.

Regards,
Suhaib

bdittmar
1st November 2009, 13:38
Dear,

I want to convert Tdinv100.trdt to String format in Report layout. Kindly,show me with example.

Regards,
Suhaib

BaanERP Programmers Guide


date.to.inputstr$()

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

Syntax
string date.to.inputstr$( long dayno, string format(7), long length )

Description
This converts a specified number of days since 01-01-0001 to a date input string.

Arguments
dayno
A number of days since 01-01-0001.

format
The format for the date string, specified by using the substitution symbols
%Dxxx[, lang] or %D(format). See sprintf.

length
The length of the date string:

6: year represented by 2 characters (century not included)
8: year represented by 4 characters (century included).


Return values
The formatted input string.

An empty string if an error occurs.


Context
Bshell function.

Example
This example creates a default input string for the data.input function.

string inpstring(8)
inpstring = date.to.inputstr$( 727000, "%D002,3", 8 )
If the %D002 format for language 3 is MDY, the string returned is "06171991" (that is, June 17, 1991). If it is DWY, and the first day of the week is Sunday, the string returned is "2251991" (that is, day 2, week 25, 1991).


inpstring=date.to.inputstr$(Tdinv100.trdt, "%D002,2", 8)

Regards

Hitesh Shah
2nd November 2009, 12:41
Select the date format like %D002 etc in report layout fields and the report itself will take care off to print the same asper appropriates date string format.

bdittmar
7th November 2009, 14:32
Dear,

I want to convert Tdinv100.trdt to String format in Report layout. Kindly,show me with example.

Regards,
Suhaib

Hello,

please place your questions in forum, not per private-mail !

Search a appropriate date format in your system wher %Dxxx is defined as month-year

or Use :

BaanERP Programmers Guide


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.

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

where month and year are longs an can be converted by str$()

so your string can be builted by concatenated like :

str$(monthno)&"-"&str$(yearno)

but there are a lot of ways to sove this !

Regards