Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return string to left of delimiter... 1

Status
Not open for further replies.

simon551

IS-IT--Management
May 4, 2005
249
Hi,

In this post, phv helped me to pull data in a query to the right of a separator using the mid and instr functions.

short answer:
NewField: IIf(OldField Like '*:*', Mid(OldField,1+InStr(OldField,':')), OldField)

I'm wondering if anybody knows how to do the same thing but instead of getting the data to the right, we want the data to the left...
 
NewField: IIf(OldField Like '*:*', Left(OldField,InStr(OldField,':')-1), OldField)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top