Convert DocTime to datetime type and format of HH:MM

Hi Experts!!
I am setting up an alert that will run every 5 minutes but would like only those docs created in the last 5 to be selected. In order to accomplish this i would like to use the DATEDIFF funtion. But have a problem in that the DocTime is a smallint (why it's not a datetime is beyond me!) How do I convert it to the proper datetime type and format?
Thx
Richard

Hi Richard,
check with this just change date smallint to datetime
select
(select case when len(oi.doctime)=3 then
convert (datetime,convert(varchar,( convert(varchar,oi.docdate,103) + ' '+ (left(oi.doctime,1)) + ':'+ (right(oi.doctime,2))) ,114),103) else
convert (datetime,convert(varchar,( convert(varchar,oi.docdate,103) + ' '+ (left(oi.doctime,2)) + ':'+ (right(oi.doctime,2))) ,114),103) end) as PreparationTime
from oinv oi

Similar Messages

  • I just bought a 7th gen Nano, no matter what I try, it will not let me load videos to it, I downloaded 5 off Itunes, it still tells me they wont play on my ipod, ive tried to convert them to every type of format possible, please help me

    I have tried everything I can try, I figured downloading them from Itunes they would go straight onto my Nano, but it wont let me put any of them on there, I cannot find anything anywhere on the internet, nothing, I am so furious, I have converted them to any and every possible format, and this fking thing will not load one of them, so before I finally lose it(my temper) and destroy my brand new Nano, can someone please please help me, I am generally pretty well versed in this kind of stuff, and can figure things out, but nothing I do will let me do anything, I am stuck, and this is not acceptable, and will possibly be the last time I purchase anything other then a desktop from Apple, they are not making things easier and more convienent, they are making things harder and more monotonous, can somebody please point me to what im doing, or not doing? thank youj

    In iTunes, do Store->View my AppleID
    Click "Deuthorize ALL"
    Then, on any computers you still have, do Store->Authorize this computer.  If there are less than 5, you will have no problem.
    You can only do "deauthorize all" once a year, so in the future, if you ever throw a computer away, remember do to "Store->Deauthorize this computer" first.

  • UDF link type and formatted search

    Dear experts,
    Im trying to use a formatted search to fill a UDF of the link type.
    The plan is to generate a weburl voor googlemaps like the link with business partner addresses. I do this with the following query:
         DECLARE @URLp1 AS VARCHAR(254)
         DECLARE @Adres AS VARCHAR(254)
         DECLARE @Plaats AS VARCHAR(254)
         DECLARE @Postcode AS VARCHAR(254)
         DECLARE @URL AS VARCHAR(254)
         SET @URLp1=('http://maps.google.com/?q=')
         SELECT @Adres=($[$U_Adres.1.0])
         SELECT @Plaats=($[$U_Plaats.1.0])
         IF LEN($[$U_Postcode.1.0])=0
              BEGIN
                   SELECT @URL=(@URLp1+@Adres+'+'+@Plaats)
                   SELECT @URL
              END
         SELECT @Postcode=($[$U_Postcode.1.0])
         SELECT @URL=(@URLp1+@Adres+'+'+@Postcode+'+'+@Plaats)
         SELECT @URL=(SELECT REPLACE (@URL,' ','%20'))
         SELECT @URL
    The select replace doesn't work yet but that's not the real problem.
    I used the following formatted search settings:
    Search in Existing User-Defined Values according to Saved Query
    Auto Refresh When Field Changes -> set to Adres
    Refresh Regularly
    When I try these settings on my UDF link style the field just stays empty.
    When I use this formatted search on a Alphanumeric(100) field it more or less works. I need to manualy refresh the field to execute the query.
    If I simplify the query to insert just one value like 'Opportunity No.' ($[$74.1.0]) it does auto update in both fields.
    Could someone point me in the right direction what I'm missing/forgetting or give me a sollution that might even be better?
    Kind regards
    Edit:
    PS. We are using SAP BO 8.8 PL15

    I've found a topic with a similar problem but there's no solution there either...
    Formatted search with Query auto update

  • Please HELP!!!  Issue w/ Transformation from date to dateTime type

    Hi Guys,
    I'm having a problem with converting date to dateTime. We have a webservice that contain dateTime type and the input is date type. Is there a simple way to convert/transform a date to dateTime format? Example date = "2009-09-12", need to convert to dateTime = "2009-09-12T00:00:00". Thanks for helping!!!

    For this specific situation you could also make use of the concat string funtion: concat(date, 'T00:00:00'). The result equals your dateTime format.
    Kind Regards,
    Andre

  • Convert smalldatetime type SQL format to Date in OBIEE

    I have a SQL database which holds date in the smalldatetime type SQL format. I want to read this date in the OBIEE. How I can achieve this. I didn't find any direct CAST for this OBIEE Answers.
    thanks,
    Naresh

    sorry to confuse here. I would reframe my question as following
    Hi,
    I have a data in SQL Database which is in ‘float’ format. The data is being stored for TimeStamp such that casting it for ‘smalldatetime’ gives the exact timestamp in SQL Server.
    For example I have dates (dTime) column and the converted columns when did casting for smalldatetime gives following result (in SQL Server)
    dTime (Float) ########################## small_date_time (CAST dTime AS smalldatetime)
    40322.271099537 ########################## May 26 2010 6:30AM
    40322.275706018503 ########################## May 26 2010 6:37AM
    40415.121770833299 ########################## Aug 27 2010 2:55AM
    Now problem is I have this (dTime) column coming as Double in OBIEE and when I’m trying to convert this to TIMESTAMP/DATE it gives error.
    To Simplify I tried following query in Answers directly.
    CAST(CAST('40322.271099537' AS CHAR) AS TIMESTAMP)
    and the error shown is below
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 46046] Datetime value 40322.271099537 does not match the specified format. (HY000)
    Do we have a way to get the format right by using cast or any other function.
    Edited by: naresh kumar on Oct 20, 2010 2:25 AM
    Edited by: naresh kumar on Oct 20, 2010 2:26 AM

  • Convert XML string into an abap format date and time

    Hi,
    Does anyone know of a method or a function module in ABAP which converts XML string into an abap format date and time.
    Here is a part of the xml that I want to convert.
    <ns2:EventDateTime>2009-07-02T10:13:45+10:00</ns2:EventDateTime>
    <ns2:EventMessageTransmissionDateTime>2009-07-02T10:13:45.987+10:00</ns2:EventMessageTransmissionDateTime>
    Currently EventDateTime and EventMessageTransmissionDateTime are type XSDDATETIME_Z and these are converted to proper dates and times. We will be changing these fields to a STRING instead of XSDDATETIME_Z. The reason for this is to make the field more versatile. The customer would be receiving dates with Zulu (2009-09-23T12:00:00Z), with offsets (2009-09-23T12:00:00+10:00/-10:00) and just local timestamp (2009-09-23T12:00:00). With this, we need to make the date fields as string
    to be able to accept the various date formats (esp. the local timestamp).
    I am looking for a standard function module or method that will convert the xml string to a proper date and time abap format.
    Would appreciate anyone's help!
    Thanks.
    Edited by: eunice ocson on Jul 13, 2009 1:49 AM
    Edited by: eunice ocson on Jul 13, 2009 1:50 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM
    Edited by: eunice ocson on Jul 13, 2009 1:51 AM

    Hi Eunice
    Use the FM 'SMUM_XML_PARSE'
    for more info
    [Convert XML string to ABAP|XML String to ABAP or GUI]
    hope it helps you.
    Thanks!!

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • How can I convert DVD- video into Apple's format so that it can be played and streamed from my Mac?

    How can I convert DVD- video into Apple's format so that I can play the content on my Mac and also stream it to my Apple TV? A few years ago, I transferred all of my home videos onto DVD but now would really like to put these onto my Mac and stream them through Apple TV to watch on the "big screen". Any advice would be most welcome!! Thanks

    MPEG Streamclip.
    Apple do not have their "own" format. You need to convert your DVDs to H.264 though.

  • Error in Portal Navigation - Font Type, Size and formatting.

    We carry through all the tips postadas in the SDN to solve this problem, however we the same have some different stations with problem.
    We are using the Bi 7,0 Portal, and we are with problems in the layout: <b>Font Type, Size and formatting</b>, and WEB.
    Somebody has some specific tip for this problem?
    Regards,
    Sbrissa.

    Hi Biroj, thanks, I´m check the error continues...
    Thanks,
    Sbrissa.

  • I have just subscribed to Adobe Export and my debit card has been charged but I cannot convert a pdf into a word format on my mac.  Does it take time to process?  I have purchased the package about thirty minutes ago?

    I have just subscribed to Adobe Export and my debit card has been charged but I cannot convert a pdf into a word format on my mac.  Does it take time to process?

    Hi nickel13,
    What is the problem you are facing?
    Is this happening with a single PDF file?
    Regards,
    Florence

  • I have a Word file in square format. Converting it to PDF wipes the format and produces a document in portrait format.

    I have a Word file in square format. Converting it to PDF wipes the format and produces a document in portrait format.

    Create a Custom Page Size with the same dimensions as your document within a new Joboptions file and then use that new Joboptions file when you convert your square document to PDF.

  • How to convert cXML dtd files into xsd format and use them into BPEL application

    Hi,
    In my BPEL application I have to use cXML dtd files by converting them into xsd format.
    I have used 'Microsoft Visual Studio' for converting cXML.dtd file into xsd format, for this 1 dtd file I am getting three xsd files (cXML.xsd, cXML1.xsd and cXML2.xsd).
    Please check this once and let me know
    1. why I am getting three xsd files for one dtd file,
    2. how can I use cXML.xsd file in my application, do I ll have to use all the three files in my BPEL app and
    3. what should I include in main xsd file (cXML.xsd) to import other two xsd files.
    kindly check this once and let me know your suggestions .
    Thanks

    Hi,
    While downloading the cXML dtd there will be example xml files. Using this xml's we can generate xsd.
    Regards,
    KANN.

  • I'm a bit confused. Since my original camera format was 720/60p, and I converted the footage to Pro Res422 in order to edit in Final Cut Pro 7, should I convert back to a higher quality format before sending the file to DVD Studio Pro?

    I'm a bit confused. Since my original camera format was 720/60p, and I converted the footage to Pro Res422 in order to edit in Final Cut Pro 7, should I convert back to a higher quality format before sending the file to DVD Studio Pro? If so, which Compressor codec is best to use in order to preserve the original 720/60p?   How do I maintain the highest quality?

    No...ProRes is a high quality format. Finishing format.  Many TV networks take that as a final deliverable. 
    BUT...DVDs aren't high definition...they are SD.  You cannot make a 720p60 DVD with DVD Studio Pro.  Any DVD you make will be SD...720x480.  The only HD DVD format out there is BluRay, and for that you need a BluRay burner.
    As for making a high quality DVD...using the BEST QUALITY settings in Compressor will work:
    #42 - Quick and dirty way to author a DVD
    Shane's Stock Answer #42 - David Roth Weiss' Secret Quick and Dirty Way to Author a DVD:
    The absolute simplest way to make a DVD using FCP and DVDSP is as follows:
    1. Export a QT movie, either a reference file or self contained using current settings.
    2. Open DVDSP, select the "graphical" tab and you will see two little monitors, one blue, one green.
    3. Select the left blue one and hit delete.
    4. Now, select the green one, right click on it and select the top option "first play".
    5. Now drag your QT from the browser and drop it on top of the green monitor.
    6. Now, for a DVD from an HD source, look to the right side and select the "general tab" in the track editor, and see the Display Mode, and select "16:9 pan-scan."
    7. Hit the little black and yellow burn icon at the top of the page and put a a DVD in when prompted. DVDSP will encode and burn your new DVD.
    THATS ALL!!!
    NOW...if you want a GOOD LOOKING DVD, instead of taking your REF movie into DVD SP, instead take it into Compressor and choose the BEST QUALITY ENCODE (2 pass VBR) that matches your show timing.  Then take THAT result into DVD SP and follow the rest of the steps.  Except you can choose "16:9 LETTERBOX" instead of PAN & SCAN if you want to see the entire image.

  • I have downloaded a movie which has the extension .m4v.  This will not play on my CD player and I can't find software to convert to a more universal DVD format.  Can anyone help?

    I have downloaded a movie which has the extension .m4v.  This will not play on my DVD player and I can't find software to convert it to a more universal format.  Can anyone help?

    If you've bought a film from iTunes then you can only copy it to a DVD or CD for backup purposes, you won't be able to watch it on a stand-alone DVD player.

  • Which Acrobat or Adobe product is best to subscribe to for converting Word files (all types) to pdf files and visa versa?

    Which Acrobat or Adobe product is best to subscribe to for converting Word files (all types) to pdf files and visa versa?
    Thank you!

    Probably PDF Pack: Reliably Create PDFs, Convert PDFs, & Merge PDFs Online | Adobe PDF Pack

Maybe you are looking for

  • OLK folder delete Office 2010

    I am trying to delete the content of Outlook 2010. The location is right. Using the following script as a logoff script to delete the content (location of Office2010 is the right one there are the files but they stay there after several restart of th

  • Transfer Pricing Utilizing Third Local Currency in Company Code?

    I was wondering whether utilizing the third local currency under the "Additional Local Currencies for Company Code" section of the IMG would not allow you to use Supply Chain going forward because that third local currency must be saved for Transfer

  • How to learn about updating winforms app

    Currently I work with a large winforms application. What is the process like to convert winforms to something like a win 8 app or windows universal for win 10.  Is this a complete recoding or are there methods to converting?

  • Mac mail virus?

    I have a feeling that Iv picked up a worm or virus that has taken over my MobileMe mail account. I haven't gotten any mail to my MobileMe account so went to look. That's when I noticed that on the 29th and 30th I sent out 30 separate e-mails using 'v

  • Rescue data from dead NOMAD jukeb

    I have a first generation NOMAD jukebox (6 GB). it's now archi'ved on Creative, as it's no longer a product for them, so I can't get any support on it from Creative. I bought my jukebox about fi've years ago when I moved from the USA to Europe. hence