Results 1 to 11 of 11
  1. #1
    Join Date
    May 2014
    Posts
    3

    Question Unanswered: datetime user input parameters

    help guys, newbie on brilliant database i want to create a user input datetime parameters and retrieve records between the 2 datetime parameters, thanks in advance

  2. #2
    Join Date
    Apr 2013
    Posts
    226
    Hi,

    I think you would want to use a form as input to get the two dates - see:

    Database Software Design and Management - Brilliant Database - Online Help System

    And then run a query from your script.

    Matty

  3. #3
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi kayserge
    I would consider using 2 user input variables "set variables by calendar" option.
    Then use these in a "and" query. You could look at examples on BD web site such as:
    1. Get recs for month Database Software Design and Management - Brilliant Database - Database

    2. Get Records Between 2 dates
    Database Software Design and Management - Brilliant Database - Database

    3. Operations with Dates
    Database Software Design and Management - Brilliant Database - Database
    4. Calculate Age
    Database Software Design and Management - Brilliant Database - Database

    Regards
    David

  4. #4
    Join Date
    Apr 2013
    Posts
    226
    I tend to prefer the form option when the user is expected to select a start and finish range. Just seems more user firendly to me then two separate input boxes. When they get the second input box up they may have forgotten what the first date was they selected, or suddenly decide they wish to change the start date. Just a personal preference I guess. With a form they can see both dates, decide that is really what they want, and click OK when happy.

  5. #5
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi again
    Thats fair enough, although I would like a custom popup form with out any other fields visible (should be possible with but more work).
    Using variables, you could have message box showing entered data and follow with confirm choice - or restart. Like many things in BD you have multiple choices in the way to do things.
    Regards
    David

  6. #6
    Join Date
    Apr 2013
    Posts
    226
    I'm referring to the "Set Vars By Form" variable option, not custom popup form. I would just create a dedicated (hidden in compiled app) form for this which would just contain the two fields.

  7. #7
    Join Date
    May 2014
    Posts
    3
    thanks guys! here's my problem the date parameter has a starting and ending, it could be the same or not, next there is also a time parameter a starting and ending. eg;
    1. starting at 8/13/2014 8:00am to 8/13/2014 5:00pm
    2. starting 8/13/2014 8:00am to 8/16/2014 12:00nn

  8. #8
    Join Date
    Apr 2013
    Posts
    226
    Just add two additional fields to the form to allow user to enter start and end time. These could be drop down lists if you wanted to limit it say to just whole hours.

  9. #9
    Join Date
    May 2014
    Posts
    3
    Thanks! how about the query to get records between the two datetime parameters

  10. #10
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    I just returned from a holiday to British Columbia, Canada and I have to get prepared again with Brilliant Database.

    kayserge,
    All I did was to capture the screenshot of the query used in the example tamcind included. If this does not help can you be a little more specific in exactly what you need (as there are some truly talented individuals here that know this software extremely well... unfortunately, I am not one of them yet but I keep trying!!!).

    David,
    Thanks for posting those links. One of my functions grabs the data between two dates and the link you provided shows a much simpler and efficient method to get the same data than the method I employed. I added another variable that adds 1 to variable 'A' and subtracts 1 from the other... all of that to ensure that I get the values between the two dates in question. The examples you linked (specifically the first one) is a much, much better way to do that. Thanks for your input!
    Attached Thumbnails Attached Thumbnails query date.jpg  
    Last edited by fireant911; 08-16-14 at 22:05. Reason: spelling error
    Daryl G

  11. #11
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    Quote Originally Posted by matty1965 View Post
    I'm referring to the "Set Vars By Form" variable option, not custom popup form. I would just create a dedicated (hidden in compiled app) form for this which would just contain the two fields.
    My apologies as this is not my thread but after reading matty1965's response, my curiosity was aroused. I have looked for a solution just like this previously and was unable to find it. I guess that I should experiment more and actually step through all of the options on this software. I like the fact that this method of setting variables can really 'clean' up the appearance and reduce the overall complexity of forms. I certainly like this suggestion.

    Thanks for this advice matty1965 - it is great when someone asks a question and the answers that appear often help others that never even knew that they had a question!

    Amazingly, this is the second piece of wisdom that I have picked up from this thread. You folks are great... now, lets get kayserge's question answered (so that he will quickly get up to speed so he can, too, help answer my seemingly endless questions).
    Daryl G

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •