Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2013-01-21
3
Medium Priority
?
483 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 32

Accepted Solution

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

Author Closing Comment

by:PBLack
ID: 38821861
Thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

877 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