Wonderbread Posted March 5, 2009 Share Posted March 5, 2009 I saw a thread of this before but my situation is a little different. I'm looking to spit out log file(s) and I would like this in this format; "DD/MM/YYYY -- HH/MM/SS" This is what I have so far; $date = @MON&"/"&@MDAY&"/"&@YEAR Link to comment Share on other sites More sharing options...
jvanegmond Posted March 5, 2009 Share Posted March 5, 2009 $date = @MON&"/"&@MDAY&"/"&@YEAR $hour = @HOUR&"/"&@MIN&"/"&@SEC $datetime = $date&" -- "&$hour I don't see what the problem is here. You were well on your way to writing the solution and it seems like you understand what to do and suddenly you stopped? Why? If you just copied the provided code then please try to understand it. Programming is not so difficult. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Wonderbread Posted March 5, 2009 Author Share Posted March 5, 2009 Strange, I was trying those before and it told they were invalid. Probably should've added that in my post. Something similar happened before when my if/else/endif statements got out of place. It was corrected by re-pasting the code the window. I'm not a beginner programmer either I've been doing python for several months now and before that I had, and still have, a vast knowledge of PHP/Html/Css. Link to comment Share on other sites More sharing options...
James Posted March 5, 2009 Share Posted March 5, 2009 Wonderbread, it would help if you could tell Manadar if it worked or not. He is not doubting that your can't program, just questioned why you stopped when you were so close. The help file is really useful. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted March 5, 2009 Share Posted March 5, 2009 I'm not a beginner programmer either I've been doing python for several months now and before that I had, and still have, a vast knowledge of PHP/Html/Css.That makes you pretty much a beginner programmer. Can't say I have much experience but after 4 years I feel much more confident than after a few months.Just as a suggestion:$datetime = @MON&"/"&@MDAY&"/"&@YEAR&" -- "&@HOUR&"/"&@MIN&"/"&@SECis much less readable than:$dateTime = @MON & "/" & @MDAY & "/" & @YEAR & " -- " & @HOUR & "/" & @MIN & "/" & @SEC github.com/jvanegmond Link to comment Share on other sites More sharing options...
Wonderbread Posted March 5, 2009 Author Share Posted March 5, 2009 Bah, my bad. I've been up far too long =\ Yes, it worked. Link to comment Share on other sites More sharing options...
James Posted March 5, 2009 Share Posted March 5, 2009 I've been up far too long =\Did you know sleep helps you concentrate more? Oh yes, after a good nights sleep you can pretty much do anything you want.More information on sleep. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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