jt463
IS-IT--Management
- Nov 23, 2005
- 134
I have had a hard time finding a thread that speaks to my question exactly.
I have a date field that is formatted like:
10/1/2006
I am trying to extract everything to the left of the /2006.
I have tried the following:
This always pulls back the '/' before the 2006
I also tried:
Which worked great until I had a 10/11/2006 date. This returns '10/1'
I would like to tell the code to return everything to the left of the right 5 characters - which would always work since the date has a yyyy format.
I got lost when I tried to do a Left function with a nested Right function!
Any help would be greatly appreciated!
I have a date field that is formatted like:
10/1/2006
I am trying to extract everything to the left of the /2006.
I have tried the following:
Code:
ActDate = Left("" & day2rst!sch_current_ & "", InStr("" & day2rst!sch_current_ & "", "/200"))
This always pulls back the '/' before the 2006
I also tried:
Code:
ActDate = Left("" & day2rst!sch_current_ & "", 4)
Which worked great until I had a 10/11/2006 date. This returns '10/1'
I would like to tell the code to return everything to the left of the right 5 characters - which would always work since the date has a yyyy format.
I got lost when I tried to do a Left function with a nested Right function!
Any help would be greatly appreciated!