By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,197 Members | 1,207 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,197 IT Pros & Developers. It's quick & easy.

Scan function??

P: n/a
How can I do this in Access? I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access

Date field is like this:
'2004 - 2006'

I just want to pull off the first year. I can do it with this code in
SQL:

Scan(Date, 1) as Start format $4.

Thanks!

Alex
Aug 4 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
JvC
This should do it:

Trim(Left(MyDateString, InStr(MyDateString, "-") - 1))

Alex Pavluck explained on 8/3/2008 :
How can I do this in Access? I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access

Date field is like this:
'2004 - 2006'

I just want to pull off the first year. I can do it with this code in
SQL:

Scan(Date, 1) as Start format $4.

Thanks!

Alex

Aug 4 '08 #2

P: n/a
On Aug 3, 8:51*pm, JvC <johnv...@earthlink.netwrote:
This should do it:

Trim(Left(MyDateString, InStr(MyDateString, "-") - 1))

Alex Pavluck explained on 8/3/2008 :
How can I do this in Access? *I can do it in 2 seconds in SQL but I
can't even get it to work in the SQL editor in Access
Date field is like this:
'2004 - 2006'
I just want to pull off the first year. *I can do it with this code in
SQL:
Scan(Date, 1) as Start format $4.
Thanks!
Alex
Thanks so much!

This did it once I fixed a bug in Access
http://support.microsoft.com/kb/275110

Thanks again!
Alex
Aug 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.