![]() Preserved Topic: how to get the actual date on a string? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Okay I just happened to have written this for a post in the gurusnetwork forum. |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Your not going to believe this, but I just finished writing my first script from scratch, and it was to print out the string "Today is Sunday December 17 2000". *edit* ( It prints out the current day and date)*/edit* |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() thanx bitdamaged and butcher. both work great, BUT: (hehe) |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() I haven't worked to much on dates in PHP. but what you guys both want to do is create a string variable with the date formatted the way you want it. |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Hey bitdamaged - |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() 1. The correct code that will show month names instead of numbers is: |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() You know, this JavaScript is almost starting to make sense to me now....... |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Thanks Bitdamaged for answering my question, sorry for treading on your thread Grumble, but I gotta ask. Could either Bitdamaged or Mr. Max please explain to me why just because you define an array with the 'month' names in it, that var month = monthNames(DateVariable.getMonth()); returns the name of the month instead of the number? Please forgive my ignorance, I'm not doubting what you tell me, I just want to know why it works. Thanks again guys. |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() When you define an array like this: |
Paranoid (IV) Inmate From: New Jersey, USA |
![]() Sure do, thanks Max. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() hey, thanx for your help guys... |