# It's about combining three integer field types into a date/object type

Topic Labels: Formulas
Solved
761 2
cancel
Showing results for
Did you mean:
4 - Data Explorer

I'm in a pickle and I can't figure out what to do even though I've read a lot of posts here and asked ChatGPT to help me over and over but nothing.

I've got three fields that are formulas but they're formatted into integer type.

1. {Fecha limite de adeudo (dia)} and it's formula:

IF(
OR({Quincena 1}, {Quincena 2}),
IF({Quincena 1},
17,
1)
)

2. {Fecha limite de adeudo (mes)} and it's formula:
IF(
{Quincena 1},
MONTH(
TODAY()
)
,
IF(
{Quincena 2},
MONTH(
)
)
)

3. {Fecha limite de adeudo (ano) (number)} and it's formula:
VALUE({Fecha limite de adeudo (ano) (string)})

I tried combining them the following way but Airtable says "the result type is not a number or a date".
IF(
OR({Quincena 1}, {Quincena 2}),
""
)

I want this last field to be a date/object type and I don't know why it's not working because the three field types that are being used in this last field's formula are integers.

1 Solution

Accepted Solutions
7 - App Architect

The route of your issue is in your final calculation, it's also a very small mistake. In order to get the result you would like you need to remove the false condition from your formula (highlighted in red below). This is because if you keep the empty "", airtable assigns this columns result type as a string, since one of the possible results of your formula is technically an empty string. By removing that condition, you formula only executes when one of your Quincena fields is populated, rather than executing on all and assigning an empty string to those records where those fields are not populated.

Current Formula:

IF(
OR({Quincena 1}, {Quincena 2}),
""
)

New Formula:
IF(
OR({Quincena 1}, {Quincena 2}),
)

I hope this helps!

2 Replies 2
7 - App Architect

The route of your issue is in your final calculation, it's also a very small mistake. In order to get the result you would like you need to remove the false condition from your formula (highlighted in red below). This is because if you keep the empty "", airtable assigns this columns result type as a string, since one of the possible results of your formula is technically an empty string. By removing that condition, you formula only executes when one of your Quincena fields is populated, rather than executing on all and assigning an empty string to those records where those fields are not populated.

Current Formula:

IF(
OR({Quincena 1}, {Quincena 2}),
""
)

New Formula:
IF(
OR({Quincena 1}, {Quincena 2}),