Displaying Time Problem w/MySQL CFMX7

Greetings -
Using
-- MySQL
-- CFMX7
I have a report designed which collects the time the report
was done. This
field is filled in by an individual. The form field is
validated for time entry.
On the insert query, the input is coded as:
--> #CreateODBCTime(form.ReportTime)#
MySQL DB Field:
--> Name: ReportTime
--> Type: Time
--> Format: HH:MM:SS
--> Default: <NULL>
When I look at the individual record in DB I see the time as:
--> 15:21:00
When I output the time on a page (without formatting) I get
this:
--> {ts '1970-01-01 00:00:00'}
When I output the time on a page (with formatting) I get
this:
--> 00:00:00
What am I doing wrong? What am I missing?
Leonard B

Hi MikeRoo,
Below is the MySQL Version, query code and error message
received.
I am sure it is something I am doing wrong or simply having a
brain
moment.
Leonard B
MySQL Version: 4.1.10a
========== CFQUERY CODING ==========
<cfquery name="qGetTime" datasource="nwbizsql01">
SELECT RecID, TimeOne
CAST (TimeOne AS CHAR (15)) AS TimeStr
FROM nwbizsql01.time_testing
WHERE RecID = 4
</cfquery>
========== ERROR MESSAGE ==========
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket]You have an
error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '(TimeOne AS
CHAR (15)) AS TimeStr FROM nwbizsql01.time_testing WHERE RecID = 4'
at line 1
The error occurred in
C:\Inetpub\wwwroot\nw-biz\mysql_time_test.cfm: line 3
1 : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 :
3 : <cfquery name="qGetTime" datasource="nwbizsql01">
4 : SELECT RecID, TimeOne
5 : CAST (TimeOne AS CHAR (15)) AS TimeStr
SQL SELECT RecID, TimeOne CAST (TimeOne AS CHAR (15)) AS
TimeStr FROM nwbizsql01.time_testing WHERE RecID = 4
DATASOURCE nwbizsql01
VENDORERRORCODE 1064
SQLSTATE 23000
Please try the following:
Check the ColdFusion documentation to verify that you are
using the correct syntax.
Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Remote Address 127.0.0.1
Referrer
Date/Time 24-May-06 11:33 AM
Stack Trace (click to expand)

Similar Messages

  • How to get/display  time with minutes in a test item

    Dear experts,
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)I've the following requirements.
    In my form, there are three text items and one save button.
    Text items named as
    No_of_days --> Number data type
    (user will enter number of days)
    hours_limit --> Char data type with format mask (HH:MI);
    (user will enter hours with minutes)
    Upto_date_time --> date data type;
    this field calculated as (No_of_days+hours_limit+sysdate)
    User will enter No_of_days or hours_limit:
    Based on the values I've to calculate Upto_date_time
    Here is the problem:
    1) If user doesn't enter hours_limit I want to show default time as " 04:00 PM"
    2) If user enter hours_limit field we should allow them to enter in the following format
    "HH24:MI" format;
    what whould be suitable data type for hours_limit field..
    I tried with char and i've set the format mask as ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    But I'm geeting the error
    "FRM-50027:Invalid format mask for given datatype"
    Please help to solve this problem,
    Regards,
    Karthi

    Hi vansul ,
    set_item_property('BLOCK3.hours_limit',format_mask,'HH:MI');
    Format mast is only allowed to date data type fields.If i set the hours_limit item's data type as date , I'm getting the error message "ORA-01843:Not a valid month"..
    How could i make this field only getting or display time with minutes?
    Regards,
    Karthi

  • Facing "Display Flickering" problem with my 15" macbook pro(A1286)while swapping the desktops and closing the tabs.....need help...reply soon

    Suggest Solution for this Display Flickering problem ....

    Hi, I read the post about calibration and I probably do that a little too often TBH! As I get so little time out the battery and mainly use my MBP on my lap, usually with the power supply near by, it gets charged to full, run to empty to the point of sleep, or sometimes it even cuts out and then is recharged to full again, so I really think it's new battery time. I've seen non Apple Official ones for between £35 and £65 that have 3 year warranties and state they are around 5200mh but am unsure due to reviews.
    Later...
    Anyway's I have now ordered a non Apple replacement from Amazon for about £35 and it has several good reviews and 4.5 out of 5 stars so I'll see if it works and report back. If it doesn't I'll send it back and get the Official Apple one.
    Message was edited by: Missy Steph

  • C3 - display time when key lock is on

    It's not mentioned in the manual, but if the keyboard lock is active, you have to push the Power button to display the date/time. Any other key displays the keyboard unlock hint.
    Nokia Lumia 520 3046.0000.1329.2001 RM-914
    Nokia Asha 302 V15.09 22-05-13 RM-813

    i have the same problem too..
     i saw my friends Nokia C3 can display time when keypad lock..
    how can i set it?
    i hope that someone will help me and others
    thank you in advance

  • How do you change Slide Display time

    I have a slide which has a 30 sec display time.  I want to change it to 6 secs.  So I go to slide propteries and change display time to 6.  I click OK but it make no difference.  When I look at the properties again, the time is set back to 30 secs !
    How do i change the slide display time?

    Thank you.  That has solved a number of my problems.  The time line does not appear by default on a new installation.  In fact it was quite tricky to get it visible but it is now.

  • Channel Info Banner Display Time

    How or where can I set the display time for the channel info banner time?  My info banner remains on the screen for about 10 seconds unless I press the exit button. 

    There is an option under settings => television =>channel bar timeout (sequence is after pressing the MENU button on your remote).
    You can set the duration to 2, 4, 8, 10 or 15 seconds.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Info banner display time reduced?

    Is it me, or did the display time of the info bar get significantly reduced? It used to be around five seconds, but now it seems to be more like 2 seconds.
    Dunno when the change happened. I only noticed it just now.

    Actually it was reduced to around 1 second for when coming out of "trick play" (pause, ff, rew, etc. on DVR) but AFAIK is unchanged for other times that the IMG invokes it.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • Banner Display Time for One App Only

    I recently found an article (http://osxdaily.com/2014/01/29/change-notifications-banner-time-mac-os-x/#commen t-607754) showing a Terminal command to change the default display time for banner-style notification. It's a great thing, but then I thought...could there be any way to apply it to one app at a time? Say I want 10 seconds for Mail.app, 3 seconds for Messages and so forth.
    Can it be done? Thanks.

    It's called Trip Journal. The problem is, I think, that my iCloud backup wasn't current, because I'm travelling overseas, so data transfer has been largely up, and I don't think it has been backing up even when I was connected to wifi at my hotel.
    I did back up my iPhone to the computer this morning -- but that was after the crash occurred, so I don't know if any data will be salvagable.
    @Norman - I tried that, multiple times, but it hasn't worked.

  • Editing Display Time for Slides

    Hello! I'm fairly new to Adobe Captivate and am using version 5.5. I am having trouble changing the display time for some of my slides (Captivate won't let me adjust display time from 4 seconds to 2 seconds), but I can adjust other slides with similar animations with no problems. Does anyone know what could be causing this issue? Thank you!

    Hi There,
    Can you check your time if you have any image or any object set to rest of the slide, then you need to first change it back to 2 seconds and then change the slide display from 4 to 2 seconds.
    Hope this helps.
    Thanks
    Priyank

  • Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?

    Why doesn't Energy Saver have an option for displaying "Time" in the menu bar?

    I'll provide some Proof
    Link 1
    Link 2
    Link 3
    you are not the only person with this problem maybe it will come back in Mountain Lion who knows. 

  • Longer display time of a tooltip

    Hello,
    how can i change the display time of a tooltip? My problem is that i have a long text in a tooltip and when the user go over a field he see the tooltip only for a few seconds. So he can read the whole text in the tooltip.
    Maybe anyone has an idea?
    with kind regards
    Markus Jura

    You could place a TextView with the same width under the field.
    Next to the field you could place a LinkToAction with an open/collapse icon to show/hide the TextView. The link's action would toggle the visibility of the TextView, the icon  source would be bound to a calculated attribute and show an open or collapse image depending on the current visibility.
    Armin

  • Aperture crashes when doing enhancements crashed at thread 35 which i think is a display driver problem any ideas folks

    Aperture keeps crashing every time I try and do some auto enhancements crash log comes up with crashed at thread 35 or 36 which seems to point to a display driver problem imac 2.16 intel core 2 duo 3gb ram os x 10.6.7.
    This is making aperture unusable I might go back to lightroom never had these problems with it.
    Graham

    Hi yes I'm running 3.1.2 I have tried 32 bit mode and it does just the same.
    Graham

  • Quicktime doesnt display time in slider

    As of two days ago any file played in Quicktime opens with a slider that has the moving dot but doesnt display time as it used to (time passed on one end and time left on the other)
    I cant find anything in the settings and it looks like i cant uninstall to try installing it again.
    This is being a big problem because im in the middle of working on a movie project and i really need to see how long different clips are and at which times are certain events.
    I would appreciate any help.
    Quicktime 10.3, Mac OS X 10.9.4

    QuickTime Player and its browser plug-in are not supported on a Windows 64 bit OS and this is one of the known "bugs".
    See if you can run your browser in the 32 bit mode which may help the plug-in work as designed.

  • I'm going nuts with display driver problems!!!!

    Hi everyone,
    I joined the forum some time ago but I can't get back in so I logged in with a new ID.(Pain)
    I have a problem that I hope someone can help with When I place any of my work or a photo into CS5-Ext. I can't do any work on it? No matter what tool other than the paint brush I use, as soon as I click on the picture / work it disappears and will only re-appear if I click on it again. I've tried all sorts and it's driving me nuts, Can anyone help?---PLEASE---
    Thanks.

    That sounds like a display driver problem.
    What OS are you running?
    If Windows, you can often visit the web site of the maker of your video card and download/install an updated driver.
    If OSX, you need to look to Apple and their OS updates to get updated display drivers.
    -Noel

  • Window 2008 R2 datacentre server time problem

    Hi Team,
    I have one window 2008 R2 data centre server, which having time problem, I have setted IST time zone but time coming 15 minute delay, I have tried to correct time by manual but time goes again 15 minute delay itself.
    Please guide how to solve it and but i don't want to use NTP, as this server is on workgroup.
    Regards
    Inder Singh Rawat

    Hi ,
    I followed following step to build NTP in window server 2008 R2.
    Enabling & Configuring NTP Server
    1. Change the server type to NTP.
    Click Start, click Run, type regedit, and then click OK.
    Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters\Type
    In the pane on the right, right-click Type, and then click Modify. In Edit Value, type NTP in the Value data box, and then click OK.
    2. Set AnnounceFlags to 5. 
    Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\AnnounceFlags
     In the pane on the right, right-click AnnounceFlags, and then click Modify. In Edit DWORD Value, type 5 in the Value data box, and then click OK.
    3. Enable NTPServer.
    Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer
     In the pane on the right, right-click Enabled, and then click Modify .In Edit DWORD Value, type 1 in
    the Value data box, and then click OK
    4. Specify the time sources.
    Open a command prompt and type the command as below: w32tm /config /manualpeerlist:peers /syncfromflags:manual /reliable:yes /update
    peers: time.windows.com or time.nist.gov
    eg: w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update
    5. At the command prompt, type the following command to restart the Windows Time service, and then press Enter:
    net stop w32time 
    net start w32time  
    i run following useful command.
    1. To resynchronize time : w32tm /resync  or w32tm /resync /rediscover
    2. To verify the configuartion : w32tm /query /configuration and w32tm /query /status
    3. Display the current time zone settings : w32tm /tz
    Now what problem i am facing , when server goes restart "Window time service stoped" and ntp corrupted.
    Even Window time service is set automatically, when i do configure again then NTP work proper.
    Please help how to resolve this problem, if server restart NTP goes corrupted becuase of window time service stopped.
    Regards
    Inder Singh Rawat

Maybe you are looking for

  • Sync is grayed out.  Can no longer sync iPod classic with iTunes.

    No longer able to sync iPod classic with iTunes.  The iPod is recognized, but sync is grayed out.  Any help out there?

  • Connection Pool and Database Sessions

    Hi, Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can

  • Hi! What cable do I purchase to connect my ipod to my car?

    Hello! I'm trying to hear my ipod's music on my car's speakers? What wire do I buy to connect the ipod to the car's auxiliary port?

  • Can i order a custom iPhoto postcard (to US) from Thailand?

    I wanted to buy a postcard I have created with iPhoto and send it to my friends in the States.  Everything went well until I needed to fill in the billing address. There is no States in Thailand though.  So i got stuck at that point. Anyone knows how

  • Problem compiling PL/SQL code

    I am having problmes compiling the following piece of pl/sql code: declare v_servicekey services.servicekey%type; v_tmodelkey tmodels.tmodelkey%type; l_bindingid bindingtemplates.bindingid%type; i_rowlimit number(28); begin select bindingid into l_bi