Format issue

di.miller

Registered User.
Local time
Today, 14:33
Joined
Nov 9, 2010
Messages
16
Hi All,

I am having trouble with formatting a field in Access. The field is called COMPLETEDATE. The data in this field has the format of "1110314" the data is of type string. How do I drop off the leading 1 in the string? :confused: What I would like to see is "110314" not "1110314" Can anyone give me a hand with formatting this field?

Thanks so much!
-Diana
 
OK, I know I need to do something here with the Left or Right( )... I have looked online and I am not finding anything helpful. That is why I am asking here. Can someone please help me to drop off the leading 1 in the string? The data comes in as "1110314" and I need it to be in the format "110314". Any help is greatly appreciated!

Thanks,
Diana
 
Hi All,

I changed the code for the field I was having trouble with in Access. Here is how I formatted it so that the pesky leading 1 was dropped:
Code:
SELECT RIGHT([HBELP_FINAL_Q.COMPLETEDATE],6) AS RealCompleteDate,
Now it works great!:p
-Diana
 
I knew you could do it :)

I should have actually said Right() and not Left(). My bad. By the way, for greater flexibility use Mid() instead, like this:
Code:
SELECT MID([HBELP_FINAL_Q.COMPLETEDATE], 2) AS RealCompleteDate,
 

Users who are viewing this thread

Back
Top Bottom