Jan 06, 2021 01:06 PM
I have created a random number generator string {RNGS} using this formula: VALUE(DATETIME_FORMAT(AddDate, ‘mm’)) # Autonumber # Autonumber.
(Note: I have purposefully substituted # for an asterisk/mutliply function in this post)
A sample result is 238425 (33 # 85 # 85). I’d like to use just the first 4 digits for my random number field
I’ve tried both RIGHT(VALUE(DATETIME_FORMAT(AddDate, ‘mm’)) # Autonumber # Autonumber,4)
and
RIGHT({RNGS},4)
Both of these generate the #ERROR! message. Please help!
Jan 06, 2021 01:17 PM
Thinking this might be a data type issue since RIGHT requires a string. You can can convert values into strings by doing something like "" & {some field}
. So you could do:
RIGHT( "" & {RNGS}, 4)
Jan 06, 2021 01:19 PM
Genius! That worked.
Thanks