Page 1 of 2 12 LastLast
Results 1 to 15 of 20

PHP date input ideas - 'disagreement' between me and my dev.

  1. #1
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194

    PHP date input ideas - 'disagreement' between me and my dev.

    Hi people!



    Wow im almost living on this forum at moment and reading so much, thanks to all the help so far!!

    Anyway, i created an access program, moved to to SQL

    Part of it im still running via ODBC, part of it i have got recreated (client use) in PHP as an online module.

    I love what he has done but one part just doesnt work for me.

    Pretty much it is the date input field of a form.

    MY system:

    [Date field]
    input= 1/1
    date = 01/01/2016

    input= 1/1/15
    date = 01/01/2015

    input= 12/12
    date DEFAULTS to 12/12/2015 as it is impossible for this task to have been done in the future and my program knows this.




    HIS system:
    {day field} {month field} {year field}
    input= 01 06 2016
    date = 01/06/2016

    eg. you have to put XX in one box, XX in another and XXXX in last!

    So now my clients have 3 boxes to input just a date, whereas i can just go 1/1 and it goes to 2016 if it can, or 2015 if the 2016 date hasnt occured yet.


    Am i expecting too much?

    Maybe im having communication issues but im trying ot be clear with him.

    Can anyone help me out how i can explain this to him or some code ideas for me to show him?

    PHP is completely above me so i have no idea how to even extract the code to show you, but i could screen shot the form..

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    Does your Dev say "it cannot be done" or "it should not be done"?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  3. #3
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    he says it is different from access and that if i have XX/XX it has to default to 2016
    which doesnt work for me. So i need the year there!

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    Are you using a TextBox to input the value? It sounds like the control is bound to a DateTime field. If true then what he says is correct but it does not need to be done that way. It would require code to implement what you have in PHP but it could be done. I take it you do not want to use the built in calendar for this input.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  5. #5
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    not really. it is for fast input of data
    typing 1/1 glen (autofinish Glenn Angel) is easier than calender
    the name part is great, hes done a good job but the date is so bad

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    So the input in the PHP system is even smarter than you've stated. It knows who Glenn Angel is? Does this all go in one control on your form?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  7. #7
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    The input for name is great.
    2 different input boxes..

    Well in truth 4!!

    DD = one
    MM = two
    YYYY = three

    Name autocomplete - awesome code - Four

    SO why is name so good but date is crappy!?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    Is the Name control a ComboBox? If so, it has an autocomplete feature built into it.
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  9. #9
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    yes it is sorry, not a textbox

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    The year can be calculated based on the value of the 1st two controls. If you are using three separate controls for the date then they are not bound to a DateTime field and there is come somewhere to put the date together and place it on a field in the RecordSource of the form. Does that sound right to you?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  11. #11
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    yes i would say so. My real question is... what kind of code can i provide to him to show what i want.
    I KNOW what i want, it seems you understand, but this guy just doesnt get it

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    I need further details. I assume the RecordSource has a dateTime field for this value. How is this date value being placed in that field from three different controls? Exit event of the year control?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

  13. #13
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    im goign to have a look.

    ive been teaching myself PHP last 5 hrs lol

    finallybuilt my first php REPORT!!!

    ... having a tiny final issue but so close

  14. #14
    gangel is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    194
    Found the code
    Code:
    $dpddateid="scdate".$i;
    $dpdmonthid="scmonth".$i;
    $dpdyearid="scyear".$i;
    if($_POST[$dpddateid]!="")
    {
    $fdpd=date("Y-m-d",strtotime($_POST[$dpddateid]."-".$_POST[$dpdmonthid]."-".$_POST[$dpdyearid]));
    }else{
    $fdpd="";

  15. #15
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,649
    Is that PHP or Access?
    (RG for short) aka Allan Bunch Previous MS Access MVP - WinXP Pro, Win7 Pro Win10 Pro - acXP, ac07, ac10, ac13
    How to mark the thread as Solved!
    Teaching is not filling a bucket but lighting a fire.
    Borrowed quote..."Docendo discimus"

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Date input error
    By billybeer in forum Forms
    Replies: 4
    Last Post: 11-23-2015, 03:08 PM
  2. Auto Date input
    By skyi in forum Access
    Replies: 6
    Last Post: 09-19-2012, 12:58 AM
  3. Custom (?) Date Input Mask
    By SeaTigr in forum Access
    Replies: 3
    Last Post: 11-07-2011, 01:40 PM
  4. capturing the input date
    By rmohebian in forum Access
    Replies: 8
    Last Post: 02-10-2011, 01:54 PM
  5. date entry on input form
    By dzawicki in forum Forms
    Replies: 3
    Last Post: 12-25-2009, 07:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Tech Forums: Microsoft Office Forums