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

Question

Question

DATEVALUE calculation in forms

asked on February 22, 2017

Hi,

I am trying to perform a DATEVALUE calculation on a date that is stored in one of my tables (Measurements) in Forms and either I have a syntax error or the DateValue is listed but not supported.  Can anyone see what I am doing wrong? The field type is number which should be what is returned and I am not receiving a calculation error- the field just remains empty....

=DATEVALUE(INDEX(Measurements.DateOfMeasure,ROW()))

0 0

Answer

SELECTED ANSWER
replied on February 22, 2017

DATEVALUE is used to convert a string that is formatted as a date into the date number value.  However, the actual date field in Forms doesn't store the date as a string, it stores it as a date, which naturally converts to a datevalue when copied from a date field into a number field.

You need to drop the DATEVALUE() part of your formula, and just keep the inner part of the formula, like this:    =INDEX(Measurements.DateOfMeasure,ROW())

When copying from a date field into a number field, it should look like this:

If for some reason your date was stored as a string (like in a Single Line field), then you'd need the DATEVALUE() part of your formula.

2 0

Replies

replied on February 26, 2017

@████████- did the earlier post resolve your question?

0 0
replied on February 27, 2017

Sorry Matthew- it took me a few days to get back to this.  Your answer worked perfectly.  Thank you!

0 0
replied on February 27, 2017

I'm really glad to hear it!  Have a wonderful day.

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

Sign in to reply to this post.