Concatenate date time and update SQL datetime field

I have a form that captures date and time in 2 separate fields data and time.
I need to combine these fileds and UPDATE a SQL database (datetime field)
The date field is passed like this  DSDATE={ts '2013-11-18 00:00:00'}
The time field is passed like this   TIME_IN1=14:05
How do I concatenate DSDATE AND TIME_IN1 so that I can insert like this 2013-11-18 14:05:00.000 ?

The easiest way may be the best. You judge.
<cfset DSDATE = parsedatetime('2013-11-18')>
<cfset  TIME_IN1="14:05">
<cfset yr = year(DSDATE)>
<cfset mnth = month(DSDATE)>
<cfset d = day(DSDATE)>
<cfset hr = listGetAt(TIME_IN1,1,":")>
<cfset mn = listGetAt(TIME_IN1,2,":")>
<cfset datetime=createdatetime(yr,mnth,d,hr,mn,0)>
<cfoutput>#datetime#</cfoutput>

Similar Messages

  • How to find the last update date time and user of record field peoplecode

    how to find the last update date time record field peoplecode?
    Thank you.

    One can check the last update date time using the following query
    SELECT LASTUPDDTTM FROM PSPCMPROG WHERE OBJECTVALUE1 LIKE 'RECNAME' AND OBJECTVALUE2 LIKE 'FIELDNAME'

  • How to Sort JTable data using Multiple fields (Date, time and string)

    I have to fill the JTable data with some date, time and string values. for example my table data looks like this:
    "1998/12/14","15:14:38","Unicorn1","row1"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/17","12:14:12","Unicorn4","row6"
    Now the Sorted Table should be in the following way:
    "1998/12/17","12:14:12","Unicorn4","row6"
    "1998/12/14","15:14:40","Unicorn4","row3"
    "1998/12/14","15:14:39","Unicorn2","row2"
    "1998/12/14","15:14:38","Unicorn1","row1"
    ie First Date field should be sorted, if 2 date fields are same then sort based on time. if date and time fields are same then need to be sorted on String field.
    So if any one worked on this please throw some light on how to proceed. I know how to sort based on single column.
    But now i need to sort on multiple columns.So what is code change in the Comparater class.
    Thanks in advance.. This is urgent....

    I think your Schedule objects should implement Comparable. Then you can sort your linked list using the Collections.sort() method without passing in a Comparator.class Schedule(Date date, String class) implements Comparable
      public void compareTo(Object obj)
        Schedule other = (Schedule)obj;
        return date.getTime() - other.getDate().getTime();
    }

  • With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?

    With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?
    With Lion 10.7.1. you where able to drag events from "All Day Events" into the "Reminders" bar to create upcoming reminders.

    Exactly the same question I was about to post!
    Great being able to sync reminders (well overdue) however if I have to re-type a calener envent into reminders it's a waste of time!! 
    Come on Apple!!
    Just need an option for the calender event to add to reminder or the old drag to add to reminder functionality back, Please???

  • Question on date, time and time stamp related

    Hi friends,
         My requirement is to find the processing time (time taken) of a task done by an agent in wf. For that I use Start Date, Start Time, End Date and End Time ( from struc SWP_LOGTAB ). I have to display the time taken by an agent in the form WWd XXh YYm (or WWd XXh YYm ZZs) ex: 2d 10h 40m 20s.
    Can any one suggest me the right FMs which take start and end date/time and give me the above format result?
    This can be achieved manually with unnecessary Ifs and CASEs but its gonna be a performance issue. Please suggest me something SAP standard.
    Thankful for your help
    Reddy

    Hi
    I will refer you to use SWWIHEAD table to retrieve start date and End Date of a Task. You have to write aprogram for this. You can find out the task from the field TS94000083 from WI_RH_TASK.
    <b>Please provide points if useful</b>
    Thanks
    Arghadip

  • Select Records between Begin Date/Time and End Date/Time

    Hi, I need to select records from table GLPCA where the CPUDT and CPUTM are between a START DATE/TIME and END DATE/TIME. 
    I have the below logic from an SAP Solution, but it doesn't seem to be working right in my opinion.  It is picking up records earlier than the date ranges.  Can anyone tell me how I might be able to accomplish this?  I'm hoping this is an easy one for the ABAPPERs... 
    Thanks,
    START DATE 20091022
    START TIME 125736
    END DATE 20091022
    END TIME 135044
    CPUDT 20091022
    CPUTM 100257
          SELECT * FROM GLPCA
             WHERE ( CPUDT >= STARTDATE AND ( CPUTM >= STARTTIME OR ( CPUDT <= ENDDATE AND CPUTM <= ENDTIME ) ) ).

    Thank you all!  I ended up using the following:
    SELECT * FROM GLPCA
              WHERE RYEAR IN L_R_RYEAR
                AND ( ( CPUDT = STARTDATE AND CPUTM >= STARTTIME ) OR CPUDT > STARTDATE )
                AND ( ( CPUDT = ENDDATE   AND CPUTM <= ENDTIME )   OR CPUDT < ENDDATE ).
    This child was born from the following thread that was found:
    update date and time of client record

  • UTC Date Time and Normal Date Time

    Hi All,
    1. How UTC date time and Normal date time differs in siebel.
    2. If legacy data needed to be loaded into siebel, in siebel few fields are date time and UTC date time fields. what would happen if we load both normal date time and UTC date time without considering them techinically?
    3. UTC date time holds any specific format in physical database? If we want to load legacy data to UTC date time format what is the query to manipulate it?
    Thankyou
    Sean

    Sean,
    Please check document below, I believe it has most of the answers to the questions you have:
    http://download.oracle.com/docs/cd/E14004_01/books/GlobDep/GlobDepUTC.html
    Hope it helps,
    Wilson

  • I want to share Microsoft word from my desktop mac to my laptop but every timeIi try and do it, it says that it can't open because it is not supported by the software. I have tried several times and updated it on the mac but its still not working.

    I want to share Microsoft word from my desktop mac to my laptop but every timeIi try and do it, it says that it can't open because it is not supported by the software. I have tried several times and updated it on the mac but its still not working. Any ideas?

    You need to install Office on the computer from the installer DVD or disc image you purchased.

  • On holidays we took pictures with two cameras and an iPad. I put everithing on my PC. Rearranged them by date, time and or subject putting a number in front of the picture name. I synchronised with my iPad and my pictures show in misselaneous order. Help

    We took pictures during oue holidays with two cameras and an iPad. I put all the pictures on my PC and reorganized them by date, time and/or subject, By putting a number in front of the picture name. Then I synced with my iPad. All the pictures show in a misselaneous order. What went or did I wrong?

    You did nothing wrong, but the photo app puts stuff in chronological order.
    You can look for another app. Afraid I don't have one to suggest, but I do understand that other apps will sort photos differently.

  • I just did something on my mac and now the date, time and battery percentage are in arabic and it says lebanon (arabic) in the language and text preference, how can i change it back to english? ps: i'm hopeless.

    i just did something on my mac and now the date, time and battery percentage are in arabic and it says lebanon (arabic) in the language and text preference, how can i change it back to english?
    ps: i'm hopeless.

    So what you want is for it to say Lebanon (English)?  If so, see if this helps:
    http://m10lmac.blogspot.com/2012/05/fixing-custom-english-region-settings.html

  • Question on date, time and time stamp related - high priority

    Hi friends,
         My requirement is to find the processing time (time taken) of a task done by an agent in wf. For that I use Start Date, Start Time, End Date and End Time ( from struc SWP_LOGTAB ). I have to display the time taken by an agent in the form WWd XXh YYm (or WWd XXh YYm ZZs) ex: 2d 10h 40m 20s.
    Can any one suggest me the right FMs which take start and end date/time and give me the above format result?
    This can be achieved manually with unnecessary Ifs and CASEs but its gonna be a performance issue. Please suggest me something SAP standard.
    Thanks in advace for your help
    Reddy

    Hi,
    I don't find any function module, but it does'nt really hard to code this using DIV and MOD instructions :
    If you've got your time in seconds :
    w_day = w_time DIV 86400.
    w_mod = w_time MOD 86400.
    w_hour = w_mod DIV 3600.
    w_mod = w_mod MOD 3600.
    It doesn't seem too bad in term of performance....
    Mathieu

  • Mapping between oracle data types and ms sql server data types

    hello
    i need mapping between oracle data types and ms sql server data types
    where can i find them ?

    read this
    http://download.oracle.com/docs/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm

  • I have an iphone5 that is eating up data time and I can't figure out why? Any thoughts?

    I have an iphone5 that is eating up data time and I can't figure out why? Any thoughts? I have closed everyting I can, even took the phone to Verizon and they are not sure what is going on.   My company email is active and pushes to the phone....I use Safari regularly to look up stuff for personal and work use.  I am on Facebook but have turned it off in notifications.  Four phones and a hotspot on the account....we have 6g and have never come close to it, until lately and it's my phone that's eating up the gigs.  So what the heck is going on?

    Go to Settings/Cellular and you can see how much data each app is using. You can Reset Statistics, then track all of the apps data usage.

  • How to use same Data Type and Length for two fields

    How to use same data type and length for two fields when using 'FOR ALL ENTRIES IN' in a select statement? For instance the select queries are :
    SELECT bukrs gjahr belnr lifnr budat bldat zlspr dmbtr waers shkzg
    FROM bsik
    INTO TABLE it_bsik
    WHERE bukrs = p_bukrs
    AND lifnr IN s_lifnr.
    IF it_bsik IS NOT INITIAL.
    SELECT belnr gjahr awkey awtyp
    FROM bkpf
    INTO TABLE it_bkpf
    FOR ALL ENTRIES IN it_bsik
    WHERE belnr = it_bsik-belnr
    AND gjahr = it_bsik-gjahr.
    IF it_bkpf IS NOT INITIAL.
    SELECT belnr gjahr lifnr xblnr
    FROM rbkp
    INTO TABLE it_rbkp
    FOR ALL ENTRIES IN it_bkpf
    WHERE belnr = it_bkpf-awkey+0(10)
    AND gjahr = it_bkpf-awkey+10(4).
    ENDIF.
    ENDIF.
    Here it gives an error in the 3rd select query that 'When you use the addition "FOR ALL ENTRIES IN itab", the fields "GJAHR" and "IT_BKPF2-AWKEY+10(4)" must have the same type and the same length.'
    Kindly clarify.

    Hi Saurabh,
    Please see the example code that I have developed for you. It will help you solve the problem.
    REPORT ZTEST_3 .
    tables : BKPF.
    data : begin of it_bkpf occurs 1,
             belnr type RE_BELNR,
             awkey type awkey,
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf.
    data : begin of it_bkpf1 occurs 1,
             belnr type RE_BELNR,
             awkey type gjahr,              " change the data type
             awtyp type awtyp,
             gjahr type GJAHR,
           end of it_bkpf1.
    data : begin of it_rbkp occurs 1,
             belnr type BELNR_D,
             gjahr type gjahr,
             lifnr type LIFRE,
             xblnr type XBLNR,
           end of it_rbkp.
    select belnr
           awkey
           awtyp
           gjahr
           from bkpf
           into table it_bkpf
           where BUKRS = 'TELH'.
    loop at it_bkpf.
    it_bkpf1-belnr = it_bkpf-belnr.
    it_bkpf1-awkey = it_bkpf-awkey+10(4).           "Here only append the required length.
    it_bkpf1-awtyp = it_bkpf-awtyp.
    it_bkpf1-gjahr = it_bkpf-gjahr.
    append it_bkpf1.
    clear it_bkpf1.
    endloop.
    select  belnr
            gjahr
            lifnr
            xblnr
            from RBKP
            into table it_rbkp
            for all entries in it_bkpf1
            where belnr = it_bkpf1-belnr
    This is just an example. Change the fields according to your requirement.
    Regards
    Abhii
    Edited by: Abhii on Mar 9, 2011 9:08 AM

  • Can I create objects in Muse, assign them with a date/time and arrange on the page accordingly?

    Hi,
    Looking to get my site to a point where I can add content/posts to my pages daily but have the newest posts/content/objects at the top of the page.
    At the moment I have to rearrange the content everytime.
    It would make sense If I could group my objects, assign them a date/time and arrange them on the page accordingly. Once the page gets full it could then overflow to another page based on the master and so on. Without having to manually create the page and rearrange the contents. But I don't know if this is possible or completely stupid!!
    Any help/advice would be greatly appreciated

    Hi,
    Looking to get my site to a point where I can add content/posts to my pages daily but have the newest posts/content/objects at the top of the page.
    At the moment I have to rearrange the content everytime.
    It would make sense If I could group my objects, assign them a date/time and arrange them on the page accordingly. Once the page gets full it could then overflow to another page based on the master and so on. Without having to manually create the page and rearrange the contents. But I don't know if this is possible or completely stupid!!
    Any help/advice would be greatly appreciated

Maybe you are looking for

  • Completely random restarts (windows + linux)

    Hey, I put together a system (see sig) for a friend, anyway they started complaining about random restarts using winxp (with or without either service pack). Cutting a long story short, we RMA'd the motherboard, got a replacement, and the problem per

  • Problem with Java applets

    Hi All I am very very new to Applets, and i am having a problem. Basically i need to create an applet with a GUI that creates a file and writes to it. I found this web pages and modified the code slightly so that it did what i needed: http://www.capt

  • Save logo for muse

    how can i save a animated  logo in adobe edge 3.0 to use it in adobe muse ?

  • [Solved] Gambas3 not working after installation.

    When gambas3 was released i downloaded source and installed in my arch machine with out knowing that same package is available in arch repo. After install i could open and work in gambas3 with out an issue. However, When gambas3.1 was released i down

  • Lightroom 5.6 Import Error

    I am using Lightroom 5.6 on a Mac Pro OS X 10.9.4 My library ircat file is in the normal (default) user file location. My photo library (contents) is on an external WD MyBook Thunderbolt Duo, connected via Thunderbolt. I have ample storage and RAM av