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.

Date To Numbers

Featured Replies

I've created a birthdate, Now I need to extract into number form the Month, Day and Year. Certainly there is a simple solution to this...

I;ve tried Brian Dunning's as follows with no success so far...

Case (

Patient_DateofBirth = "January"; 1;

Patient_DateofBirth = "February"; 2;

Patient_DateofBirth = "March"; 3;

Patient_DateofBirth = "April"; 4;

Patient_DateofBirth = "May"; 5;

Patient_DateofBirth = "June"; 6;

Patient_DateofBirth = "July"; 7;

Patient_DateofBirth = "August"; 8;

Patient_DateofBirth = "September"; 9;

Patient_DateofBirth = "October"; 10;

Patient_DateofBirth = "Nov"; 11;

Patient_DateofBirth = "November"; 11;

Patient_DateofBirth = "december"; 12;

// default

0

)

Much thanks all!

Dr.L

Is Patient_DateofBirth a Date field?

  • Author

Yup...

Then how about =

Month ( Patient_DateofBirth )

See also:

http://www.filemaker.com/11help/html/func_ref1.31.12.html#1028277

  • Author

Bingo! When now that was easy enough...swear I tried that first, must have missed something as it returned the name of the month. Must have only used it as a text rather than as a number in the calculation...

This works also for day and year. THANK YOU!

Dr.L

must have missed something as it returned the name of the month.

That would have been =

MonthName ( Patient_DateofBirth )

The MonthName() function returns the name of the month.

  • Author

Understood...as usual it must have been user error. I believe I may have had it returned as a text rather than as a number...all is well now!

Dr.L

I believe I may have had it returned as a text rather than as a number...all is well now!

Just to clarify: the Month() function always returns a number; if you set the result to Text, it will be converted to digits of that number. For example:

Month ( SomeDate ) // returns 4 (number)

GetAsText ( Month ( SomeDate ) ) // returns "4" (text)

  • Author

It seems as though I do have one more question about the date format...once I use:

Year (date), how can I trim it to just show the last two digits for the year?

Dr.L

Right ( Year ( date ) ; 2 )

  • Author

Just figured that out...I was trying to trim first...THANKS!

Dr.L

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.