Sign in to follow this  
Followers 0
Wonderbread

Time

7 posts in this topic

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

Share this post


Link to post
Share on other sites



$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.

Share this post


Link to post
Share on other sites

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 :P

I've been doing python for several months now and before that I had, and still have, a vast knowledge of PHP/Html/Css.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

I'm not a beginner programmer either :P

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. :unsure: 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&"/"&@SEC

is much less readable than:

$dateTime = @MON & "/" & @MDAY & "/" & @YEAR & " -- " & @HOUR & "/" & @MIN & "/" & @SEC

Share this post


Link to post
Share on other sites

Bah, my bad.

I've been up far too long =\

Yes, it worked.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0