No announcement yet.

Time datatype is not 'sticking'

  • Filter
  • Time
  • Show
Clear All
new posts

  • Time datatype is not 'sticking'

    Hello. I am very new to Scriptcase, but not to database programming.

    I created a database with several tables. In the table in question, I have a time in and time out set of fields, as well as a date field.

    I chose the TIME datatype for time in/out fields and date timestamp datatype for date field.

    When I created a form to add records to the database, everything works, but the time fields specifically do not seem to save properly.

    They save and all is well, then in the grid it shows as 00:00:00:00 for both fields no matter what I put in there in the form.

    When going back to the record, the fields do indeed show 00:00:00:00 instead of what I put (say 10:00:00 and 12:00:00).

    Also, I find no way to choose AM or PM.

    Is there a better time picker control (Jquery or otherwise)?

    Thank you for any help.


  • #2
    Are the fields in your SC form set as date/time AND the equivalent fields in your database are also set as date/time too?


    • #3
      Fields in database are set to TIME that are related to the time. The date field is set as DATE.



      • #4
        I use just dates in my SC apps (not times, so far) - in SC those fields are of type "Date", but in my DBMS (MySQL - not sure what one you use) the corresponding fields are "Datetime".

        So, I think you need to use datetime (or equivalent) in the database (regardless of whether in SC you want date or time or both), and then let SC "pick" what it needs based upon the SC field type you select (Date, or Time, or Date and Time).