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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Split Function

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
US
I'm trying to use a split function to split the data in a record. I'm not sure how to use this function as the Help files are not too easy to read. I can tell that it wants a value to split and I'm using the ":" as a demlimeter, but how do I assign it to an array variable?

Heres what I have so far. I'm probably way off, but heres what I have.


NumberVar Agents:= {tblDowntime.AgentsAffected};

StringVar TimeDown:= "{tblDowntime.TimeDown}";

NumberVar array Temp:= Split(TimeDown, ":");

NumberVar AgentDT:= (Temp[0] * 60) + (Temp[1] * Agents) / 60;



Thanx,

.:donn:.

 
It appears that you are trying to come up with a numeric value for Agent down time, expressed in hours.
There is an easier way to do this using the TimeValue() function - is {tblDowntime.TimeDown} a timedate field? Have you got a sample value for this field? What version of Crystal? Malcolm
 
You can't split a string, only an array. You could create the array and then split it, but that would simply put you back where you were. Are you trying to parse a string that contains more than one name? What does the value look like? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I figured it out. Thanx, I didnt need to use a split. I was making it harder than it needed to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top