Where :
YourTextVar is a variable of type Text(80)
YourDateTimeVar is a variable of type DateTime
YourDateVar is a variable of type Date
YourTimeVar is a variable of type Time.
See if this works for you,
Regards,
Willy
Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
txtTheDateTime = '1. Nov 2010 13:55:59';
EVALUATE(intDay,COPYSTR(txtTheDateTime,1,STRPOS(txtTheDateTime,'.') - 1));
txtTheDateTime := COPYSTR(txtTheDateTime,1,STRPOS(txtTheDateTime,'.') + 1);
CASE UPPERCASE(COPYSTR(txtTheDateTime,1,STRPOS(txtTheDateTime,' ') - 1)) OF // the second parameter of STRPOS is a blank!
'JAN': LintMonth := 1;
'FEB': LintMonth := 2;
...
END;
txtTheDateTime := COPYSTR(txtTheDateTime,1,STRPOS(txtTheDateTime,' ') + 1);
EVALUATE(intYear,COPYSTR(txtTheDateTime,1,STRPOS(txtTheDateTime,' ') - 1)); // the second parameter of STRPOS is a blank!
datTheDate := DMY2DATE(intDay,intMonth,intYear);
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Comments
You can do:
Where :
YourTextVar is a variable of type Text(80)
YourDateTimeVar is a variable of type DateTime
YourDateVar is a variable of type Date
YourTimeVar is a variable of type Time.
See if this works for you,
Regards,
Willy
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!