Jump to content

Time


Recommended Posts

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

Link to comment
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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...