fmchong
14th March 2011, 11:50
Dear Baan Experts,
I would like to convert 21/03/2011 (domain =tfgld.date) to March 2011.

Please Advise.

Thank you so much

bdittmar
14th March 2011, 13:12
Dear Baan Experts,
I would like to convert 21/03/2011 (domain =tfgld.date) to March 2011.

Please Advise.

Thank you so much

Hello,
please use search before post.

sprintf$()
Syntax:

function string sprintf$ (string format [, void ...])

Description


This formats a string and returns the formatted string. The format argument contains zero or more ordinary characters and substitution symbols. The ordinary characters are copied directly to the output string. The substitution symbols specify formats for the values specified in the expression arguments and are substituted by these formatted values.

The substitution symbols are used in the sequence in which they are specified. The first substitution symbol is used for the first expression argument. The second substitution symbol is used for the second expression argument, and so on.

In addition to a range of numeric type expressions, the function supports dates, amounts, single-byte strings, multibyte strings, bidirectional strings, and combined normal and bidirectional strings. input strings that contain bidirectional strings must be specified in logic order. The result is also returned in logic order.
------------------------------------------------------------------

%D( format ) Use for dates.

This option enables you to define your own date format by using the following subformats of the ‘%D’ format:

%m month in year 1 - 12
%w week in year week 0 in previous year week 53 in current year
%W week in year week 53 in previous year
%d day in month 1 - 31
%e day in week 1 - 7
%j day in year 1 - 365
%y year without century 01 - 99
%Y year with century 1 - 9999
%h name of month (‘Jan’ - ‘Dec’)

(abbreviated)

%H name of month (‘January’ - ‘December’)
%a name of day (‘Sun’ - ‘Sat’)

(abbreviated)

%A name of day (‘Sunday’ - ‘Saturday’)


Regards

en@frrom
14th March 2011, 13:13
Check the sprintf$() function, and specifically the %H (= month in words). You want something like this:

result = sprintf$("Date: %D(%02d %-20H %04Y)", <your date field>)

Good luck!
Eli Nager

fmchong
14th March 2011, 13:41
Dear Baan Experts,
Thank you very much for the advise. It's work perfectly.