Solved

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

Posted on 2013-01-21
3
470 Views
Last Modified: 2013-01-26
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
0
Comment
Question by:PBLack
  • 2
3 Comments
 

Assisted Solution

by:PBLack
PBLack earned 0 total points
ID: 38802342
DOH CLng not Cint I got it to work.
0
 
LVL 31

Accepted Solution

by:
awking00 earned 500 total points
ID: 38802375
Have you tried Val([RF_STDTE])?
0
 

Author Closing Comment

by:PBLack
ID: 38821861
Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now