External Database - Importing - Time Attribute

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Arnold
Posts: 24
Joined: Mon Apr 09, 2018 11:58 pm
Location: San Francisco Bay Area - California - USA

External Database - Importing - Time Attribute

Post by Arnold »

I was experimenting bringing in one of my external MSSQL database tables from my production application. There seemed to be an inconsistent result pulling in my StartTime field.

This StartTime field is defined and showing as a time data type in the database.

In the Persistence Settings for this table the StartTime attribute was discovered as a Timestamp which causes obvious issues. I was wondering why the form showed the icon with the calendar and clock for that attribute automatically - and that timestamp data type was the reason.

What am I doing wrong? Is this a possible import bug? Would like to figure this out because I have lots of time data type attributes in my external database.

Thanks
Arnold

Aware IM Version 8.2 Build 2563 - MSSQL 2017 - Windows Server 2012
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: External Database - Importing - Time Attribute

Post by Jaymer »

I dont know your solution.
Aware doesnt appear to support a MSSQL "time" field.

"What are you doing wrong?"
I don't think anything.
Last edited by Jaymer on Mon Dec 10, 2018 5:18 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: External Database - Importing - Time Attribute

Post by aware_support »

Code: Select all

In the Persistence Settings for this table the StartTime attribute was discovered as a Timestamp which causes obvious issues. I was wondering why the form showed the icon with the calendar and clock for that attribute automatically - and that timestamp data type was the reason.
What are the issues? I think you can only show the time part on the form for the Timestamp attribute if you change the format of the attribute.
Aware IM Support Team
Arnold
Posts: 24
Joined: Mon Apr 09, 2018 11:58 pm
Location: San Francisco Bay Area - California - USA

Re: External Database - Importing - Time Attribute

Post by Arnold »

Please refer to link below for my comments and screenshots about this. I must be missing something because this makes the time attribute unusable for viewing and entering. Hope this helps to show what I am seeing and envisioning. Thanks Arnold

http://www.nicetouch.com/download/aware ... ribute.pdf
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: External Database - Importing - Time Attribute

Post by Jaymer »

Arnold, sorry, I re-read my comment - a bit terse.
I said you weren't doing anything wrong, because there's nothing you COULD do any better - I wasn't convinced Aware would handle just a 'time' field...
BUT IT DOES.

MS SQL field is "time(7)" (which is what comes in from your external data discovery)
Aware is set to "Timestamp" with a format of "HH:mm"

Data shows fine on a Query and Form
Data matches in a SQL Query
Screen Shot 2018-12-10 at 12.28.14 PM.png
Screen Shot 2018-12-10 at 12.28.14 PM.png (9.57 KiB) Viewed 7065 times
Screen Shot 2018-12-10 at 12.28.08 PM.png
Screen Shot 2018-12-10 at 12.28.08 PM.png (10.78 KiB) Viewed 7065 times
Going back to your OP, the only thing you didn't do was modify Aware's "Format" to exclude the date formatting.
Screen Shot 2018-12-10 at 12.34.39 PM.png
Screen Shot 2018-12-10 at 12.34.39 PM.png (15.88 KiB) Viewed 7065 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Arnold
Posts: 24
Joined: Mon Apr 09, 2018 11:58 pm
Location: San Francisco Bay Area - California - USA

Re: External Database - Importing - Time Attribute

Post by Arnold »

Thanks Vlad and Jaymer,
I should it in my screenshoot but never went to changed the Format to HH:mm and the Widget leaving it on Date/timer control (shows only the clock properly) -- and those two things made it happen correctly.

Yippee
Arnold
Post Reply