Extract month from Date field as a number from 1-12

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Using Tap Forms Extract month from Date field as a number from 1-12

Tagged: ,

Viewing 1 reply thread
  • Author
    Posts
  • January 6, 2019 at 8:44 PM #33260

    Ronlangara
    Participant

    Hi
    I am wondering if there is a way to get the month as a number (from 1 to 12) out of the date field.I can get it as a text string ie. January, no problem, but not as 01 as in this example.

    Thanks in advance for any help/suggestions.

    Regards
    Ron

    January 7, 2019 at 12:01 AM #33264

    Brendan
    Keymaster

    Hi Ron,

    Sure. You can add a Calculation field with the following function:

    DATE(Date Field; "MM")

    Tell the formula to return a Text value and it will display 01 – 12 for the month numbers extracted from the Date.

    If you truly want a Number value rather than a Text value that looks like a number, then use the STR2NUM() function to turn the result into an actual numeric value that you can use in other math type functions.

    Thanks,

    Brendan

Viewing 1 reply thread

You must be logged in to reply to this topic.