Jump 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.

Retreiving info from specific dates

Featured Replies

Hi folks...a bit stumped and I hope you can help.

1. The db keeps stats on various items. It is necessary to compare data for the same day from the previous week, previous month and previous year. Not simply the same date, but the actual day is what's important, ie: Monday, third week of Jan must be compared to Monday of the previous week, to the third Monday of December and to the third Monday of Jan 2001.

To keep it simple, consider a db of just four fields to begin with:

Date

Salary - number field

Salary Last Week - calc field?

Salary Last Month - calc field?

Salary Last Year - calc field?

eg:

Salary $250 Date 1/25/02

Salary Last week: $350 Date 1/18/02

Salary Last Month: $275 Date 12/17/01

Salary Last Year: $500.00 Date 1/15/00

Is it possible to retrieve this information from the database using calculation fields only? I can calculate the dates I want reasonably enough but I have not found a way to retrieve the actual data.

any thoughts, hints would be appreciated.

pc

Spock would say "fascinating." The key is, for the date of every record, calculate the 3 other dates (Same Day: Prev_week, Prev_Month, Prev_Year) and then create relationships between those 3 fields and the main date field, allowing data to be displayed and compared.

Simple design, the trick is to come up with working definitions for those 3 dates.

The first is easy: Prev_Week = Date - 7

Prev_Month and Prev_Year are trickier, because the number of days is arbitrary next to the day of the week. You might use some combination of WeekOfYear, and DayOfWeek.... Let me think about that one...

Create an account or sign in to comment

Important Information

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

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.