GrahamT Posted May 18, 2009 Share Posted May 18, 2009 (edited) I want to do the following: $NowTime = _NowCalc() $NewTime = _DateAdd( 'n',90, $nowTime) which works fine. But, then I want to extract from the $NewTime string, the time in hh:mm format. I'm sure I can do it with _DateSplit. but I can't figure out how. Any help appreciated. Thanks, Graham Edited May 18, 2009 by GrahamT Link to comment Share on other sites More sharing options...
system24 Posted May 18, 2009 Share Posted May 18, 2009 Dim $Date Dim $Time _DateTimeSplit($NewTime, $Date, $Time) $TimeStr = StringFormat("%02i:%02i", $Time[1], $Time[2]) [center]It's a question of mind over matter, if I don't mind, it doesn't matter.[/center] Link to comment Share on other sites More sharing options...
Malkey Posted May 18, 2009 Share Posted May 18, 2009 I want to do the following: $NowTime = _NowCalc() $NewTime = _DateAdd( 'n',90, $nowTime) which works fine. But, then I want to extract from the $NewTime string, the time in hh:mm format. I'm sure I can do it with _DateSplit. but I can't figure out how. Any help appreciated. Thanks, GrahamTry this. ; #include <Date.au3> MsgBox(0, "", "Now: " & _NowCalc() & @CRLF & _ "Now Plus 90 minutes: " & _DateTimeFormat(_DateAdd('n', 90, _NowCalc()), 3)) ; Link to comment Share on other sites More sharing options...
GrahamT Posted May 18, 2009 Author Share Posted May 18, 2009 Try this. ; #include <Date.au3> MsgBox(0, "", "Now: " & _NowCalc() & @CRLF & _ "Now Plus 90 minutes: " & _DateTimeFormat(_DateAdd('n', 90, _NowCalc()), 3)) ;Brilliant - thanks very much! Graham Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now