Getting integer out of a string with leading zeros in query builder

I am using the query builder to try and get an integer from a string field.


Where the [RF_STDTE] is a string text of dates. I want to convert it to an integer in the query builder but not change the format of the field in the database table.

It was saved to the text field in the format YYYYMMDD

The MM and DD can have zero place holders so I think that is why it reports an error.

How can I do this?

Who is Participating?
awking00Connect With a Mentor Commented:
Have you tried Val([RF_STDTE])?
PBLackConnect With a Mentor Author Commented:
DOH CLng not Cint I got it to work.
PBLackAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.