Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-01-21
3
Medium Priority
?
481 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

688 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