Solved

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

Posted on 2013-01-21
3
475 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 500 total points
ID: 38802375
Have you tried Val([RF_STDTE])?
0
 

Author Closing Comment

by:PBLack
ID: 38821861
Thanks
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

828 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