Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conversion of julienne type date

Status
Not open for further replies.

Debug44

Technical User
Jan 12, 2004
19
US
I am using Crystal 8.01 accessing Baan IVc4.
Does anyone have a simple formula to convert the hours accounting dates to a standard date format?

Example

3 seperate fields in Baan
Day = 4
Week = 18
Year = 2004

This represents April 21st, 2004 (4th day of week 18th in year 2004)
I need the formula results to be one field with a standard date.
I need to convert to a conventional date to provide a constant format for calculations.I have never encountered this until Baan.

Any help is appreciated.
(I know this is probably easy, do I won't tell anyone that I spent an hour on it already before resorting to Tek. :)
 
You need to know what counts as the first week of the year and the first day of the week. Maybe you can adapt the following which returns 4/28/2004 (not 4/21/2004), and which is based on counting the Sunday of the week that includes Jan.1 as the first day of the first week of the year:

dateadd("d", {Baan.day}-1, (dateadd("ww",{Baan.week}-1, date({Baan.year},01,01)-dayofweek(date({Baan.year},01,01))+1)))

-LB
 
Thanks a lot LB...I made a 1 mod and it worked AOK for me.

{still can't figure out why Baan programmers use 5 different date formates in IVC products}

Thanks again for the help....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top