Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

weekofyearfiscal return 2-digit week

Featured Replies

  • Newbies

this is probably an easy problem, as i'm fairly new to filemaker.

I've got a database that keeps track of an employee's working hours....

Each line in the report has the info: date, time in, time out, timelunch, timedaytotal

and at the end of each 7 day week, there's a subsummary that lists the total number of hours for that week.

now, the problem comes when sorting by week. it is currently sorting by date, and yearandweek (year and week is a calculation of "year" combined with "weekofyearfiscal"...

so, for early january 2004, i would get a value like "20047" and for a week in late 2003, it will give me "200341"... so filemaker sorts my 2003 date as being greater than my 2004 date because the number of digits is greater.... so i'm wondering if there is a way to return a weekofyearfiscal with a double-digit date, so that 20047 becomes 200407....

thanks in advance for your help!

  • Author
  • Newbies

nevermind, i figured out a solution... not sure if it's the best one, but here it is:

Year(date)&Right("00" & justweekofyear, 2)

"justweekofyear" is a text file containing the result of the function weekofyearfiscal....

i wonder if i can put that function right into the above calculation......

yup, even better

Year(date)&Right("00" & WeekofYearFiscal(date,2), 2)

that's prettier.

thanks anyway guys....

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.