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

Trim or Left 1

Status
Not open for further replies.
Jun 13, 2013
7
0
0
Hello I am using a script to find out password expiration on user accounts. My script returns a variable $daystoexpire in a format like this 38.03:17:32.2838808 which include the days, hours minutes etc. I only need the days. How can I trim this to only include the days. Thanks.
 
Will this work?
$days = $daystoexpire.substring(0,$daystoexpire.IndexOf("."))


Light travels faster than sound. That's why some people appear bright until you hear them speak.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top