AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TimeDate variable, set seconds, minutes, hours

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ghee22



Joined: 04 Jul 2009
Posts: 36

PostPosted: Sun Oct 11, 2009 9:15 pm    Post subject: TimeDate variable, set seconds, minutes, hours Reply with quote

Is there a way to change a datetime variable without adding or subtracting via EnvAdd or EnvSub?

For example, I'd like to copy A_Now's & only change minutes and seconds to 00:00.
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4652
Location: AHK Forum

PostPosted: Sun Oct 11, 2009 9:27 pm    Post subject: Reply with quote

Question
Code:
Now:=SubStr(A_Now,1,10) . "0000"
MSgBox % A_Now "`n" Now

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
ghee22



Joined: 04 Jul 2009
Posts: 36

PostPosted: Mon Oct 12, 2009 2:25 pm    Post subject: Reply with quote

HotKeyIt wrote:
Question
Code:
Now:=SubStr(A_Now,1,10) . "0000"
MSgBox % A_Now "`n" Now


Thanks, this did work for this particular example. Is there a function that is easier to read, like EnvAdd allows seconds, minutes to change seconds or minutes, respectively?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group