OGM123
28th February 2016, 15:46
Good day,
I'm having a problem with the date on my excel report.
it shows as:
DATE
1325517664
I need it as:
DATE
02-01-2012
On my table its written as 02-01-2012 so i don't really know why it shows differently when I print. Can someone help?
bdittmar
28th February 2016, 17:53
Hello,
don't know how you create the xls, but using sprintf$ should solve your problem.
Dates
| Suppose date format 002 is: "year/month/day in month"
string result(80)
result = sprintf$("%D002", 727168)
| result contains "1991/12/2"
| Example of substitution symbol %D(format)
string result(80)
result = sprintf$("%D(Date: %02d/%02m/%04Y)", date.num())
| result contains "Date: 12/07/1993"
result = sprintf$("Date: %D(%02d %-20H %04Y)", date.num())
| result contains "Date: 12 June 1993"
UTC dates and times
| Date format 002 is "year/month/day in month"
| Time format 001 is "12 hour format:minutes:seconds AM/PM symbol"
string result(80)
result = sprintf$("%u002 %001", utc.num(), utc.num())
| Result contains "1997/01/01 10:02:53 pm"
string result(80)
result = sprintf$("UTC: %u(%02d/%02m/%04Y) %U(%02h%x%02m%x%025 %a)", utc.num(), utc.num())
| result contains "UTC: 22/07/1997 06:24:53 am"
| provided that for the user's language the time
| separator is ":" and the AM symbol is "am"
| Using a comma after a %u substitution symbol
string result(80)
result = sprintf$("%u001, ,Message text....", utc.now())
| result containts "06-05-15,Message text...."
Regards
Ajesh
28th February 2016, 18:04
Is the same format getting displayed on the Baan Print as well, When you print it on "D" device or "D66" Device?If yes, then you need to do Report Formatting on Baan.
Just check the Print format of the field on the Report? Double click the field on Report Layout and then move to the Print Format Field,
What does the field contain?
You can always update the content with the date format which you like.For example, You can put "%D002" or "%D003" or the specific Date format which you require.For more details, You can refer to the Session, Maintain Date formats in Tools Configuration Module and in that you can choose the Date Format which you would want. For example if the Date format 012 has DD-MM-YYYY, then you can pick up date format 012, and you can put "%D012" in the Print Format field of the Report Field
OGM123
29th February 2016, 07:55
Hello,
don't know how you create the xls, but using sprintf$ should solve your problem.
Dates
| Suppose date format 002 is: "year/month/day in month"
string result(80)
result = sprintf$("%D002", 727168)
| result contains "1991/12/2"
| Example of substitution symbol %D(format)
string result(80)
result = sprintf$("%D(Date: %02d/%02m/%04Y)", date.num())
| result contains "Date: 12/07/1993"
result = sprintf$("Date: %D(%02d %-20H %04Y)", date.num())
| result contains "Date: 12 June 1993"
UTC dates and times
| Date format 002 is "year/month/day in month"
| Time format 001 is "12 hour format:minutes:seconds AM/PM symbol"
string result(80)
result = sprintf$("%u002 %001", utc.num(), utc.num())
| Result contains "1997/01/01 10:02:53 pm"
string result(80)
result = sprintf$("UTC: %u(%02d/%02m/%04Y) %U(%02h%x%02m%x%025 %a)", utc.num(), utc.num())
| result contains "UTC: 22/07/1997 06:24:53 am"
| provided that for the user's language the time
| separator is ":" and the AM symbol is "am"
| Using a comma after a %u substitution symbol
string result(80)
result = sprintf$("%u001, ,Message text....", utc.now())
| result containts "06-05-15,Message text...."
Regards
Hey thanks bro.. worked like a charm. Much appreciated!