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

CUT STRING VALUE 1

Status
Not open for further replies.

gmie

Programmer
Sep 6, 2001
29
0
0
MY
Hello guys...

I have a string DOB. It value is 12/12/1975. What I want to do right now is to take value 1975 and put in another string named AGE. It mean string AGE will contain 1975.

So how to take value 1975 from string DOB and put it in string AGE.

Plz somebody.......

TQ
 
If your're dealing with a string then all you need to do is use the syntax 'NewVariable := Copy(DOB, 7, 4)'.
If the data type is a Tdate then you will initially have to convert the ODB to a string using 'DateToStr' and then use the 'Copy' function.
Hope that this helps.
Steve
 
I'm working on it....thanks
 
hey..thanks StevenK it work. thanks a lot for your guide .... :D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top