Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
200 - 500 GB
500 - 800 GB
800 - 1200 GB
1200 - 1500 GB
1500 - 2000 GB
> 2000 GB
Total votes: 54

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 3rd April 2018, 13:18
Svidos29 Svidos29 is offline
Join Date: Oct 2017
Posts: 52
Svidos29 is on a distinguished road
Baan: Baan IV - DB: Onpen Sql - OS: Windows 10
Calculate weeks based on the day
Baan: ERP LN 6.1 FP11 (Infor ERP 10.5)
C/S: Client

Hi all,

the question is: how can i calculate the number of the week, based on the day that i have ? For example 05/02/2018 ==> week 6.

thanks in advance.
Reply With Quote
Old 3rd April 2018, 14:36
mark_h's Avatar
mark_h mark_h is offline
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,219
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I do not know about LN but in 4c4 I can look at the company calendar (tirou400) to get the week.

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Old 3rd April 2018, 14:58
bdittmar's Avatar
bdittmar bdittmar is offline
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,761
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES

do a search before post, please. It's discussed several time.

Use sprintf$()
%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’)

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

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

| 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$(" %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$(", ,Message text....",

    | result containts "06-05-15,Message text...."
Reply With Quote
Old 3rd April 2018, 16:46
vahdani's Avatar
vahdani vahdani is offline
Join Date: Aug 2002
Location: Cologne, Germany
Posts: 438
vahdani is on a distinguished road
Baan: all - DB: all - OS: Unix / Win2K
Hi Svidos29,

you depending on your type of date (UTC or days since 01.01.01) you can use either or function!
May the force be with you!
Reply With Quote
Old 11th April 2018, 01:23
v_kewl v_kewl is offline
Join Date: Dec 2008
Posts: 58
v_kewl is on a distinguished road
Baan: LN 6.1 - DB: MS SQL - OS: Windows 2003
long o.wkdy, o.yrdy, o.week, o.year, o.wkdy, o.yrdy, o.week, o.year)

o.week hold the value which you are looking
Reply With Quote
Sponsored Links

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Invoices printing issue-display last record with 2 lines tracylee Tools Development 7 20th October 2017 11:51
Kalenderwoche MS-Tech Deutsches Forum 3 23rd February 2017 19:24
Provide day to day Baan IVc4 application support. Be the subject matter expert for Ba danburkart28 Jobs and Resumes 1 14th December 2013 05:06
report print condition Elrodyn Tools Development 3 18th March 2009 11:13
MRP Bucketing - Demand on last day of period Bryan Manufacturing & Supply Chain 4 14th December 2001 19:51

All times are GMT +2. The time now is 07:26.

©2001-2018 - -