Parse Date in Query

JangLang

New member
Local time
Yesterday, 22:27
Joined
May 26, 2013
Messages
2
This is an easy one but I'm fairly new to this. In a query, I have the following data. If a number has more than six digits, I need to parse past the fifth digit and that becomes a new field. If it has five or fewer digits, no record is entered into Column2. For example:

Column1 Column2
12345
54321
123456 6
12345678 678
123
9876541 41
6

What simple code does it take to perform this in a query? Thanks!
 
Answered elsewhere, involving IIf(), Len() and Mid().
 
Something Like this...

Column1: Mid([YourField], 1, 5)
Column2: IIF(Len([YourField]) > 5, Mid([YourField], 6, Len([YourField])-5), "")
 

Users who are viewing this thread

Back
Top Bottom