You are viewing limited content. For full access, please sign in.

Question

Question

Forms 10 formulas, how to get two decimal places for =MONTH(Date) and =DAY(Date)?

asked on September 21, 2016

How would I go about getting the Month and Day but with two decimal places.

Date field is 9/21/2016, defaulting to todays date.

=MONTH(Date)        gives me "9" but I want "09"

=DAY(Date)       gives me "21"  but if the day is lower than 10 it does the same as above.

Any suggestions? or is this a limitation to formulas in Forms v10.

 

Also if I do:

=DATE(YEAR(Date),MONTH(Date),DAY(Date))   I get "42634"  How can I make this a readable date?

0 0

Answer

SELECTED ANSWER
replied on September 21, 2016

You can use the following formulas:

Month

=IF(MONTH(Date)<10,0&MONTH(Date),MONTH(Date))

Day

=IF(Day(Date)<10,0&Day(Date),Day(Date))

The idea is to check if the returned value is less than 10 and if it is, then prepend it with "0", otherwise just use the returned value.

1 0

Replies

replied on September 21, 2016 Show version history

Thank you!!  Worked like a charm.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.