E9.2 UTime not saving time to database from Grid

BOster

BOster

Legendary Poster
I have found that when I have a grid on a form and I set a UTime field it is not saving the time portion to the database, only the date portion. I can see in ER code that the GC variable does in fact have date and time but it only saves the date to the DB with time being set to zero. I have confirmed this both in the application when the records are retrieved into the grid and at the DB level. When I save UTime fields to the DB from a C BSFN using JDEBASE APIs I don't seem to have any issues - both date and time are saved. Only on data bound controls (i.e. a Form Grid) in an APPL. Anyone else have this issue?
 
Does the Time Zone Options tab on the grid column properties change anything?
 
No, played with that at first to see if it was jut a display thing. Then looked in the DB directly and found that it was not saving time portion. Debugged the APPL and confirmed that the GC variable did in fact have the time portion after the value was set.
 
What Alias are you using?
I had this issue a while back and I 'think' I solved it by messing with timezones and using a different alias than a custom one. I used TDSTR and TDEND.

I say think as I can't remember the object I did this in to check for you, but at first it was around the display, all were DATE 000000 but when I messed about with the 2 above it worked for display. I think I then also use these in other development to create and update the same table
 
Old thread I know but I think I found an answer, at least for my tools release, and I think it is a bug.

On the grid column on the power edit form you must select this property for the UTIME field (the default property "Date and Time" still only saves the date and not the time). If you have a power browse form I believe you also need to set this property as shown below as well to view the saved time value. I was playing around with this on the power browse but still only getting the date and no time. It wasn't until I set this display option on the update grid that it started saving the time. So "Display Options" is a misnomer. It is really "Save and Display Options but only the last one works".

ScreenShotUTimeGridProp1.PNG

Example. Last grid record was AFTER I set this property on the update grid.
ScreenShotUTimeGridPropEx1.PNG
 

Attachments

  • ScreenShotUTimeGridPropEx1.PNG
    ScreenShotUTimeGridPropEx1.PNG
    20.7 KB · Views: 1
Back
Top