Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Updating Time field using ODBC

Featured Replies

  • Newbies

Hi all,

I am trying to use SQL UPDATE command to update a field defined as Time field. What I noticed is if I do it after 10:00 AM then the code works fine. If I do it before 10 AM then I get a ODBC error - Invalid Date Value.

I am inserting the code snippet here. The tstring is a string value that is being passed to the SQL string. I printed SQL string just before execution. Every thing looks fine. But when the statement is executed I get the ODBC error.

For eg.; say I executed the SQL at 1:22:15 AM the value in tstring is 01:22:15 AM. Same as in SQL String, but when the SQL is executed the ODBC error I get say Invalid Date Value 1:22:15 PM. So the leading ZERO is missing and also AM changed to PM. What am I doing wrong ?

Here is the code -

sqlString2 = "UPDATE reassigns SET endDate={" & endDate

sqlString2 = sqlString2 & "}, endTime={" & tstring

sqlString2 = sqlString2 & "}, endType = 2"

sqlString2 = sqlString2 & ", wrkDuration = " & techDuration

sqlString2 = sqlString2 & " where techReqID = " & triggerID

sqlString2 = sqlString2 & " and endType = 0"

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.