Skip to Content

How to get month number from date?

Hi All,

I wanted to get Month number from a date which i'm getting from prompt variable.

I cannot use substr() function to get month value as the date length will increase (i.e 11/30/2016).

I tried below formula and it doesn't work.

1.

2. Getting #ERROR on below two formula

=FormatDate(ToDate([Prompt_date];"dd/mmm/yyyy");"Mmm")

=FormatDate(ToDate([Prompt_date];"dd/mmm/yyyy");"dd/mmm/yyyy")

date.PNG (2.5 kB)
date1.PNG (16.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2016 at 07:50 AM

    Hi Please use

    =MonthNumberOfYear(ToDate([PromptDate];"MM/dd/yyyy hh:mm:ss a"))

    Regards

    Niraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2016 at 09:01 AM

    Hi,

    Please refer the below URL,

    How to use formulae to change date and time formats in WebIntelligence

    Regards,

    Vidhya.C

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.