Whats a good string for Date?

Discussion in 'PHP' started by dannbkk, Jun 17, 2007.

  1. #1
    Im looking for a good php string for date, any ideas? something that can output 20-May-07 is good!
    I also will need extra code around the field to display a kind of a automatic selection graph. I had seen something like this before but am not sure how to create it.

    Thanks in advance.
     
    dannbkk, Jun 17, 2007 IP
  2. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    echo date("d-F-y");
    PHP:
    would output that date, but I don't know what you mean by the second thing sorry :D
     
    decepti0n, Jun 17, 2007 IP
  3. dannbkk

    dannbkk Well-Known Member

    Messages:
    1,403
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    120
    #3
    so how does it end up being something like?
    $date = echo date("d-F-y") $_POST['date']);
    PHP:
    and what would be a good syntax for that? VAR(11) or something?

    what i meant earlier was next to when you input the date next to the field could i have a quick pick date select box? and what code do you need for something like that?
     
    dannbkk, Jun 17, 2007 IP
  4. dannbkk

    dannbkk Well-Known Member

    Messages:
    1,403
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Im actually looking at doing something like this but I dont know how to call the date from the database with this code and what code to add to database if any?

    <input type="hidden" name="Date" value="<%=dteDate%>">
    	<input name="showDate" type="text" style="width:200; position:absolute;" value="<%=dteShowDate%>" onClick="if(self.gfPop)gfPop.fPopRLCalendar(document.frm.Date,null,null,document.frm.showDate,null);return false;" readonly="true">
    	<a href="#" onClick="if(self.gfPop)gfPop.fPopRLCalendar(document.frm.Date,null,null,document.frm.showDate,null);return false;"  title="Click to open calendar">&nbsp;<img src="images/iconCalendar.gif" width="16" height="13" border="0" style="position:relative; left:182; top:2; z-index:10;" /
    PHP:
     
    dannbkk, Jun 21, 2007 IP
  5. lepunk

    lepunk Guest

    Messages:
    105
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I prefer to use YYYY-MM-DD format as most script using too(most of php coders are not us residents) code for it: date("Y-m-d");
     
    lepunk, Jun 21, 2007 IP