Alpha Developers Network

Guest


Author Topic: starttime and endtime not being saved properly  (Read 296 times)

0 Members and 1 Guest are viewing this topic.

Laurencia

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Real Name: Laurencia Newland
starttime and endtime not being saved properly
« on: March 03, 2017, 08:35:21 AM »
Upon entry of a new record (from the detail/edit UX form, in LivePreview mode), the INSERT (MySQL) fails apparently due to missing (wrong format) data:

:jqcalendar_starttime (T) 10/22/2017 12:00:00 00 am
:jqcalendar_endtime (C) 10:37 am

1292 - 'Incorrect datetime value: '10:37 am' for column 'EndTime' at row 1'

Where the DATE portion does exist, the TIME seems to be getting submitted as the DATE, and the time is always 12:00:00 00 am regardless of setting in the form.  Why is the datatype showing T on starttime, but C on endtime?

This is quite confusing.

Often, the Date portion is missing altogether (although the time is then properly submitted as the time).

The jqcalendar.aex file is dated 8/31/2015
« Last Edit: March 03, 2017, 08:43:01 AM by Laurencia »

Jim Coltz

  • Moderator
  • Expert
  • *****
  • Posts: 109
  • Karma: +1/-0
    • A5CustomSolutions
Re: starttime and endtime not being saved properly
« Reply #1 on: March 04, 2017, 07:28:26 AM »
It sounds like the data binding for the UX is not set up correctly. Please verify your mapping. Note that the mapping is dependent on whether your back-end is using separate date and time columns or date-time columns. Also verify that the back-end database is configured to match.
Jim Coltz
Alpha Custom Database Solutions, LLC
www.a5customsolutions.com

Laurencia

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Real Name: Laurencia Newland
Re: starttime and endtime not being saved properly
« Reply #2 on: March 04, 2017, 07:53:12 AM »
The MySQL table was created using the MySQL script at http://www.a5customsolutions.com/jqcalendar_docs.html

The table columns are StartTime (datetime) and EndTime (datetime).

onDialogInitialize has dim e._state.separate_date_times set false

Is the above as required?


Laurencia

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Real Name: Laurencia Newland
Re: starttime and endtime not being saved properly
« Reply #3 on: March 04, 2017, 08:44:10 AM »
After further experimentation, it appears your theory is correct.

Thank you.

Jim Coltz

  • Moderator
  • Expert
  • *****
  • Posts: 109
  • Karma: +1/-0
    • A5CustomSolutions
Re: starttime and endtime not being saved properly
« Reply #4 on: March 04, 2017, 08:46:34 AM »
I am happy to hear you have it sorted out.
Jim Coltz
Alpha Custom Database Solutions, LLC
www.a5customsolutions.com