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

Question

Question

How to Reference Date Fields in Calculations & Preserve Formatting?

asked on August 29, 2022

Hello! I'm trying to write a formula where if a certain radio field is marked as "Yes", then populate the date from field A into field B (a single line field), but if that radio field is marked as "No", then populate field B with a static text value.

The issue I'm encountering is that the date is getting converted to a string when referenced. For example, if I enter today's date and mark the radio field as "Yes", it comes through as "44802" instead of "08/29/2022", as would be expected. 

Are there any tricks to allow date fields to be referenced correctly in other formulas? I've tried both =TEXT and =T without any luck. Any help would be appreciated. Thanks!

0 0

Answer

SELECTED ANSWER
replied on August 29, 2022 Show version history

Hi Dylan

I don't think there is a built in Function type for that, so your have to go at it another way such as this

=IF(Choice="Yes",CONCATENATE(MONTH(Date),"-",DAY(Date),"-",YEAR(Date)),"Something")

=IF(Choice="Yes",CONCATENATE(MONTH(Date),"/",DAY(Date),"/",YEAR(Date)),"Something")

You change the order of the fields in the CONCATENATE formula, or change the - to / is that suits your format requirments. MONTH(), DAY() and YEAR() are all LF Functions

1 0
replied on August 29, 2022

As always, Steve comes to the rescue! Thank you very much, sir! That did exactly as I was hoping it would. I personally find it odd that there's not a simpler solution to this built right into the product, but I'm happy there's people like you out here to offer workarounds! 

Thank you very much, Steve, and I hope you have a great rest of your week!

0 0

Replies

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

Sign in to reply to this post.