Days in a Month

Please let me now how can I extract the number of days a particular month has. Example If January is selected in a enum which has all months listed, it should show it has 31 days or if April is selected it should show 30 days.

Thanx.

In general, based on your requirement of enum based month name input to show the number of days, I believe the simplest approach is one could make a simple lookup for the enum. The number of days in all months is always fixed except February. So you could have two enum input values for February-Leap and February- Non leap as two options for February.

Please further elaborate on your requirement if there is some other requirement from apart from using just a month name enum. For example, using a date column as an input.

1 Like

Basically I have 2 Columns the first one has the month which will be selected from the enum and another column which is number type will show the number of days in that month.

Can you give a small example code or formula for doing this?

I don’t mind using another datatype like date or something if its easier…

Thanx.

Somethingl ike below

First Column Type Enum called say [MonthsSelect]

valid If of this column {“January”, February", “February-Leap”, “March”, “April”, …,“Novembrt”, “December”}

Second Column Number type called say [MonthDays]
App formula for [MonthDays]

SWITCH([ MonthsSelect], “January”, 31, “February”, 28, “February-Leap”, 29, “March”, 31,“April”, 30, …,“November”, 30, “December”, 31, 30)

2 Likes

You are a Genius! Thanks you so much!! God Bless :blush: :blush: That was perfect and Quick!!

I have one more question if you could please help…

I have a Form with Barcode as text type column and I have a Product Name as a Ref. Column referring to the Product Master Table.

If the Barcode is entered and if the corresponding product is found it should show it otherwise it should let us select it from the Dropdown list.

Please help.

Thank you!!