Link to home
Start Free TrialLog in
Avatar of Todd MacPherson
Todd MacPhersonFlag for Canada

asked on

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.

CST: CInt([RF_STDTE])

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?

Thanks
SOLUTION
Avatar of Todd MacPherson
Todd MacPherson
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of awking00
awking00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Todd MacPherson

ASKER

Thanks