The same Excel DATE.VALUE function in SQL

Hi, I need to convert a date in a number that Excel can recognize.
I'm trying to do a
SELECT
(trunc(SYSDATE) - TO_DATE('1900-01-01', 'yyyy-mm-dd'))
FROM dual
And I retrieve this: 41014
But today in excel is 41016!!
Why? There is a better solution than this?
Thank you, R.

See this topic for an answer: Import Excel Date Field
Basically you need to do this:
SELECT (TRUNC(SYSDATE) - TO_DATE('01-JAN-1900', 'DD-MON-YYYY')) + 2
FROM   dual

Similar Messages

  • Can we write data to different sheets in the same excel output file ?

    Hi,
    I am using XML publisher and generating output in the excel sheet format.
    Is it possible to write the data to different sheets on the same excel file using XMLP?
    Please let me know how to do this.
    Thanks in advance,
    Raj.

    Hi,
    No, it's not possible with 5.6.2. Excel based templates are supposed to be coming but I don't know when the release date will be.
    Thanks
    Paul

  • 2 Dimensions with the same master data

    Dear all,
       In a application,I got 2 dimensions customer and ship-to customer.
       Technically, I maintain the data for both dimensions separately.
       From business point of view ,these 2 dimensions should point to the same master data.
       How can we deal this kind of scenarios in BPC in both MS and NW version ?
       In BW , we can create infoObject by referring  to other infoObject.
       The two infoObjects will share the same data storage( the data store in the same table). Dose BPC support this kind of function?
    Thx,
    Jeff

    Hi,
    As far as I know (MS Versions), you will have to have two different dimensions, meaning two different dim files (.xls) with their respective dim and mbr tables behind. You can not have the same table in the database serving two different dimensions.
    What you can of course do is to automate the dimension/s update based on the same reference data. e.g. a DTS / SSIS process getting the data from the source and creating / updating the two physical dimensions in BPC based on a unique source.
    Hope this helps,
    Jc

  • I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. How can I fix this?

    I have created a PDF form with multiple drop downs, all with the same drop down values. When I select a value from 1 of the drop down fields, it replicates in all of the others - which I do not want. Can I fix this?

    I'm fairly new to this, but I think it has to do with the way you have the drop downs named. Did you copy one then keep pasting it in each field? If so, that is the problem. You should rename each one with a different number: Dropdown1, Dropdown2, etc. I think that might solve the issue.

  • I have a large number of photos imported into iPhoto with the dates wrong.  How can I adjust multiple photos (with varying dates) to the same, correct, date?

    I have a large number of photos imported into iPhoto with the dates wrong.  How can I adjust multiple photos (with varying dates) to the same, correct, date?

    If I understand you correctly, when you enter a date in the Adjust Date and Time window, the picture does not update with the date you enter.  If that is the case then something is wrong with iPhoto or your perhaps your library.
    How large a date change are you putting in?  iPhoto currently has an issue with date changes beyond about 60 years at a time.  If the difference between the current date on the image and the date you are entering is beyond that range that may explain why this is not working.
    If that is not the case:
    Remove the following to the trash and restart the computer and try again:
    Home > Library > Caches > com.apple.iphoto
    Home > Library > Preferences > com.apple.iPhoto (There may be more than one. Remove them all.)
    ---NOTE: to get to the "home > library" hold down option on the keyboard and click on "Go" > "Library" while in the Finder.
    Let me know the results.

  • How can I get iCal not to show the same birthday dates from my iCloud

    How can I get iCal not to show the same birthday dates from my iCloud?

    You don't need them stored locally for a backup. You can manually export your contacts as archive for backup. Also, if you are backing up with Time Machine, you already have a backup. If your hard drive crashed, you would have to rely on your backup or iCloud anyway.
    So, if you're comfortable with that, sign out of iCloud. Choose to delete contacts from the computer. When you sign back into iCloud, you should only have iCloud contacts listed in AB. When you open iCal, you should only have one listing for birthdays.
    The other alternative is to disable the Birthday c.alendar and create one manually.

  • Spot colors Black, All have the same alternate color values

    If printer’s mark [Crop, Registration, Page] is enable in the InDesign preset options, we are getting “Spot colors Black, All have the same alternate color values” error in the PITSTOP log report.

    Rob, here's screenshot of Acrobats Output Preview Object Inspector. You can download my PDF here - //www.fileswap.com/dl/Q1CzzOzEqt/
    I'm not sure if CM was assigned to document when created or  afterwards. In Color Settings preferences is stated Fogra 39 (if it matters - document was meanwhile saved and opened...). Are there other options to assign workspace to exsisting document?
    Peter, this is not the case. Placed image has embeded same color profile as is working space of document in ID. I tried the same with sRGB image placed in same ID document and compared it to PS but color shift (greenish) is present - it looks exactly the same.
    Guys, I can't tell you how happy I am to have you help me with this terrible and nerve-wracking problem.

  • How to avoid the Amount and Date values for VOID Cheques

    Hi All,
    I had created a two window i.e For Amount and Date. If I process the cheque the Amount value and Date should not trigger for VOID CHEQUES.
    Can any one tel me how to avoid the Amount and Date values for VOID Cheques
    Your help will be greatly appreciated.
    Regards
    Yathish

    Hi,
    I dont know which tablel you are referring to, is it PAYR table and the field VOIDR?
    If a cheque is voided, it would have a reason and it is stored in VOIDR field of this PAYR table.
    Check if the field VOIDR is filled, if it is filled, do not print the amount and date.
    Regards
    Subramanian

  • The Same Excel Functions Not Giving the Same Result in Numbers

    I'm been using Excel for years and now that I've made the switch to Mac, I thought I should probably utilise the iWork suite of software and get rid of Microsoft once and for all.
    Whilst I love the user-friendliness, there are so many small things that Apple to appear to have overlooked which keeps me hanging on to Microsoft Office just a little, but I digress.
    OK, So I have one sheet in Numbers with the following data.
    I am trying I need to search Column A for the TLDs in Column C, if they exist output the correct renewal price from Column D in Column B
    e.g. A2 contains .net so  B2 should have 12.50 in it.
    A
    B
    C
    D
    1
    Domain Name
    Renewal Price 1
    TLDs
    Renewal Price 2    
    2
    test.net
    .com
    5.00
    3
    test.co.uk
    .co.uk
    10.00
    4
    test.com
    .net
    12.50
    So... can someone please explain to me why the same functions which exist in Numbers and Excel (VLOOKUP / LOOKUP / SEARCH) do not work in Numbers as they do in Excel? If there is a valid reason, fine, I'll accept that, but how do I acheive the above?
    The formula which WORKS in B2 in Excel but NOT in Numbers is:
    =VLOOKUP(LOOKUP(32768,SEARCH(C$2:C$4,A2),C$2:C$4),$C$2:$E$4,2,FALSE)
    Thanks in advance.

    So... can someone please explain to me why the same functions which exist in Numbers and Excel (VLOOKUP / LOOKUP / SEARCH) do not work in Numbers as they do in Excel? If there is a valid reason, fine, I'll accept that, but how do I acheive the above?
    That's a form of "array function" (searching a "table array").  Numbers can't do array functions the way Excel can.
    Here's one way to achieve the same goal in Numbers:
    The formula in B2, copied down:
         =VLOOKUP(RIGHT(A2,LEN(A2)−SEARCH(".",A2)+1),Prices::$A:$B,2,FALSE)
    SG

  • How to join the Rule ID to the Error Excel data table.

    I have a requirement to get the invalid active rule ID from the rule table for the interface errors
    Interface has the logic to log an error, if more than 1 rule found for same combination of product, location and carrier. 
    The error log is monitored by business users and they would like to see invalid rule on the error report, so they can go and correct those.
    This is my Input:
    Error Table is in SQL database, we do the Excel data query and send the below table information to users.
    ID
    Source
    Product
    Location
    Carrier
    Date
    Error Msg
    1
    VMI
    EX_0
    EX_A
    EX_ABC
    Jan-15
    More than 1 Active Rule found for this combination
    2
    VMI
    EX_1
    EX_B
    EX_XYZ
    Jan-15
    More than 1 Active Role found for this combination
    End User Expecting Output like this, invalid Rule to be added on the error report.
    ID
    Source
    Product
    Location
    Carrier
    Date
    Error Msg
    Invalid  ID
    1
    VMI
    EX_0
    EX_A
    EX_ABC
    Jan-15
    More than 1 Active Role found for this combination
    1
    2
    VMI
    EX_1
    EX_B
    EX_XYZ
    Jan-15
    More than 1 Active Role found for this combination
    3
    I need to look 2 different tables to get invalid rule ID for the same product, location and carrier combination.
    Cross –Reference table (this table has the corresponding internal ID’s for the external value from the error table) source is the common field in error table and the cross reference table.
    ID
    Source
    External Value
    Internal Value
    Internal ID
    1
    VMI
    EX_0
    IN_Pen
    001
    2
    VMI
    EX_1
    IN_Pencil
    002
    3
    VMI
    EX_A
    IN_NJ
    101
    4
    VMI
    EX_B
    IN_CA
    102
    5
    VMI
    EX_ABC
    IN_PILOT
    201
    6
    VMI
    EX_XYZ
    IN_LITER
    202
    After getting all the required Internal ID, I am executing below query to find out invalid rule.
    SELECT ID
    FROM dbo.Rule r
    WHERE r.Status='Active'
    AND r.productID= 001
    AND r.LocationID=
    101
    AND r.CarrierID=
    201
    AND
    ‘Jan-15’ NOT between From_Date and To_Date
    Result:
    ID
    1
    Rule Table
    ID
    Product ID
    Location ID
    Carrier ID
    Status
    From Date
    To Date
    1
    001
    101
    201
    Active
    Jan 14
    Dec 14
    2
    001
    101
    201
    Active
    Jan 15
    Dec 15
    3
    002
    102
    202
    Active
    Jan 14
    Dec 14
    4
    002
    102
    202
    Active
    Jan 15
    Dec 15
    Currently I am running these query’s manually to find the out the rule id and informing to users to correct them.
    Please let me know if this is not clear.

    Hi ManuGT,
    i couldn't get you. As the following, the invalid rule is 1,3. but as your description and there should be two internal value IN_NJ and IN_CA, and the invalid rule should be 1,2,3,4 in the rule table. you want to get the invalid Rule id, but why do you want
    to return the count? could you please explain clearly??
    ID
    Source
    Product
    Location
    Carrier
    Date
    Error Msg
    Invalid  Rule
    1
    VMI
    EX_0
    EX_A
    EX_ABC
    Jan-15
    More than 1 Active Role found for this combination
    1
    2
    VMI
    EX_1
    EX_B
    EX_XYZ
    Jan-15
    More than 1 Active Role found for this combination
    3

  • SQL: Having problems passing a date value to dynamic SQL

    SQL Version 2008 (not R2)
    Problem:  1)  I'm getting the following error message when trying to run the sql code below.
    SQL "Messages" Returned when running code:
    Msg 206, Level 16,
    State 2, Procedure uspxc_WAWP_10_Get_VPData, Line 0
    Operand type clash: int is incompatible with date
    Loaded VP DATA for Month: 20121201
    Problem Code Line: 
    SET @dynamicSQL = 'EXEC ' + @StoredProcedureName + ' ' + @DEVModeYN + ', ' + CAST(@WIPMonth as varchar);
    Any help would be greatly appreciated.  I've spent several hours trying to get around this error.
    Full Code:
    ALTER PROCEDURE [dbo].[uspxi_XIUD_98_DataConversionGET_VP_WIPJobHistory] (@DEVModeYN nchar(1) = 'D', @WIPMonth Date)
    AS
    BEGIN 
     SET NOCOUNT ON;
     DECLARE @returnCode AS INT ,
       @dynamicSQL AS VARCHAR(8000),
       @msg as varchar(60),
       @DEVModeYN nchar(1) = 'D',
       @WIPMonth date = '20121201',
       @StoredProcedureName AS VARCHAR(60)
     SET @returnCode = 0
     SET @StoredProcedureName = 'uspxc_WAWP_10_Get_VPData'
    -- Check to see if @StoredProcedureName exists in the database.
    IF EXISTS(SELECT name FROM sys.procedures WHERE name = @StoredProcedureName)
     BEGIN 
      -- RUN SP to Import VP Data for each WIPMonth parameter value
      SET @dynamicSQL = 'EXEC ' + @StoredProcedureName + ' ' + @DEVModeYN + ', ' + CAST(@WIPMonth as varchar);
      SELECT @dynamicSQL;
      -- RUN stored procedure for WIP Month
      EXEC (@dynamicSQL);
      SET @returnCode = 0;
      SELECT @returnCode;
      SET @msg = 'Loaded VP DATA for Month: ' + @WIPMonth;
      PRINT @msg;
      GoTo SPEND
     END 
     ELSE
      SET @returnCode = 1;
      SET @msg = 'NO DATA IMPORTED for Month: ' + CAST(@WIPMonth as varchar(10))
      PRINT @msg
    SPEND:
    END
    Bob Sutor

    When you work with dynamic SQL, you should never build a full SQL string by concatenating values, because this is more difficult to get right and also has problems with SQL injection and efficient use of the SQL Server cache.
    So the correct way to do this in dynamic SQL would be:
    SET @dynamicSQL = 'EXEC ' + quotename(@StoredProcedureName)  '@DEVModeYN, @WIPMonth';
    EXEC sp_executesql @SQL, N'DEVModeYN nchar(1), @WIPMonth date',
                       @DEVModeYN, @WIPMonth
    A lot easier and cleaner! (Note that the variable @SQL must be declared as nvarchar.)
    ...however, in this particular case, this is still an overkill, and there is no need for dynamic SQL at all. EXEC accepts a variable for the procedure name, so:
    EXEC @StoredProcedureName @DEVModeYN, @WIPMonth
    ...but it does not stop there. You can make all these changes, but you will get the same error. To wit, you get the error on Line 0, which means that it is the call to the procedure that fails. Apparently, you are passing an integer value, when you were
    supposed to pass a date. Maybe you forgot to put the dates in quotes?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Accessing Excel cell value from PL/SQL

    I Would like to part my question into 2 sections. Both are related to PL/SQL
    (Version 8.x or 9.x) COM automation
    A). I have a spreadsheet with some values in the following cell address
    File Name : Employee.xls
    Worksheet Name : Emp_Detail (There are other spreadsheets)
    Cell Address
    Employee id : C50
    Name : Z10
    Address : X10
    I will have to grab the follwing cell values and insert into the staging table
    usinf PL/SQL. I have read some of your article realting to OWS package which
    retieves the whole excel spread sheet.
    B). I have a Activex control developed in VB6.0 and registered. Inside the dll there is a class
    AccessXLS.cls, which uses the objects/functions relating
    to the Excel spreadsheet.
    I would like to know is there any COM automation method
    to activate the dll from my PL/SQL.
    Awaiting for your reply

    Hi,
    Here's my suggestion
    If you wanna access the dll check out "external procedures", you can search it everywhere in OTN.
    However it's easier to use Heterogenous Services to connect database with other sources.
    Check out http://asktom.oracle.com/pls/ask/f?p=4950:8:13454621522426176943::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:4406709207206,
    Tak Tang answer on May, 25, 2004 rules!

  • Choosing the correct Excel Data Mining Addin

    My company has SQL Server 2008 (not R2) and Office 2010.  I checked the Excel Data Mining Add-in downloads on both the Microsoft site and SQLServerDataMining.com looking for this combination but cannot find it.  The DM Addin for Office 2010 are
    all SQL Server 2012 and the SQL Server 2008 version has Office 2007.  I installed the SQL Server 2008/Office 2007 add-in but it keeps getting disabled.  I get an error message stating that there are compatibility issues.  Does anyone have an
    idea on what the best add-in is to install?  There are many users in the organization and the version of SQL Server is way above my pay grade.
    Thanks,
     

    Hi ChuWil2,
    The Data Mining Add-ins for SQL Server 2008 is a free download that can be used with either Excel 2007 or Excel 2010. When you use the data mining add-ins, you can connect to an existing instance of 
    SQL Server 2008 Analysis Services and use the data mining algorithms and services provided by that server to perform data mining on the data in your Excel workbook and other supported data sources.
     To use both add-ins on the same computer, you must install the same version of both add-ins. Each version requires the corresponding version of Excel. When installing SQL Server 2008 Data Mining Add-Ins and it
    can be used together with 32-bit version of Microsoft Office 2010 . In addition, if you are running a version of Windows other than Windows 7, you will need to download and install .NET Framework 3.5 SP1. For more information, see:
    http://social.technet.microsoft.com/wiki/contents/articles/1090.how-to-use-the-sql-server-data-mining-add-ins-with-powerpivot-for-excel.aspx
    There is detail about how to troubleshoot installations of add-ins, you can review it.
    http://social.technet.microsoft.com/wiki/contents/articles/13737.troubleshooting-installations-of-powerpivot-and-other-add-ins.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • After Getting Error on Screen Changing the same screen data

    Hi,
    I am populating error message  in module pool program . I want to edit the fields in the same screen currently it is nor allowing .
    I use the CHAIN  and ENDCHAIN also .
    In my module pool screen i selecting some records if records contains different data the it is populating the error after that in the same screen i want to change the data .
    Regrads
    Nandan.N

    Hi Srihari,
    In this case follow the following code,
    PROCESS AFTER INPUT.
    CHAIN.
      FIELD: FIELD_01 MODULE CHECK_FIELD_01,
                 FIELD_02 MODULE CHECK_FIELD_02,
                 FIELD_03 MODULE CHECK_FIELD_03,
                 FIELD_04 MODULE CHECK_FIELD_04.
    ENDCHAIN.
    Write your validations for the screen FIELD_01 in the MODULE CHECK_FIELD_01
    so when you enter data in this field it enters this Module and checks the validations, if value passes the validation then the cursor moves to the next field (i.e. Field_02) otherwise if it fails the validation & you have specified the message type as 'E' then it waits on the same field of the screen till a correct value is entered.
    Hope it helps you,
    Regards,
    Abhijit G. Borkar

  • IPad Excel Data Analysis Function

    Hello there,
    I am stuck with a question no one seems able to answer- I've tried all three of our local Apple stores and they haven't been able to tell me. I also don't know any iPad users that have been able to give me an answer either.
    I have been using a 5S and am very familiar with the functionality of Numbers and Pages. However, I'm a finance student and the fact of the matter is that I have to have access to Excel. I've invested YEARS and thousands of dollars into the iOS ecosystem and I'm very torn over what to do next. I'm hoping to migrate permanently from a laptop to a tablet for my productivity, which involves extremely heavy duty (5+ hours daily) word processing and spreadsheet creation. Pages handles the job just fine, but Numbers isn't really cutting it; Excel is simply the de facto standard in my line of work. I was pleased as punch when Microsoft finally launched Office for iOS. If the simple functions were all I needed, my choice would be open and shut. However, it's not. I must have access to the Solver and Data Analysis toolpaks. This is where it gets tricky. I have been told by Mac users running Excel that data analysis is not natively supported as it is on a Windows machine. Fine. However, no one I know is using full Office through iOS and no one at the Apple Store has been able to answer me definitively on this, either. Does anyone out there know first hand if the Data Analysis and Solver toolpaks are available on iOS version of Office? I would like to avoid fussing around with another tablet (quality, etc) and the fact that iOS is the only mobile operating suite where I can seemlessly blend Google, Apple and Microsoft, I am really, really, really hesitant to leave it. I am not willing to shell out the money for Office on iOS and run it on my phone (though I love that idea) just to find that it won't do data analysis (I'm all for experiments but that's a bit pricey for a student). Thanx for your time.
    TL:DR, does the new Microsoft Office for iOS provide Solver and Data Analysis toolpaks in Excel?

    I know what the toolpaks are (in the Mac version of Excel they're referred to as "add ins"), and again, I can find no evidence that Microsoft supports toolpaks/add-ins in Excel for iPad.
    If you wish to confirm this with other users, I'd suggest you ask in the Excel for iPad forum:
    http://answers.microsoft.com/en-us/office/forum/office_mobile-excel-os_device_ip ad?auth=1
    Regards.

Maybe you are looking for

  • Setting App level Items and using it.

    Hi all I am setting the application level item value by application level process which is working good. application level process : select get_dbname into env_str from dual. But when I use this variable value, its not working. In logout URL,, I am t

  • Display multiple rows of datas from database in IDM forms

    Hi, I asked the same question in this forum before and some one answered to use 'FieldLoop'.I tried using that it didn't work.I using IDM version 5. Heres the code... EmployeeList is a supposed to be java array which contains java bean object,( Emplo

  • HT1199 mirroring doesn't stay "on" anymore

    I use an external monitor with my MacBook Air. Until yesterday, the "turn mirroring on" feature would stay on after I turned it on. Now, I have to turn it on everytime I start up my computer. What happened and how can I get it to stay on all the time

  • How to forbid window title bar to be draged?

    If a top level vi has the window title bar,how to forbid user to drag the title bar to change window's position? P.S. vi's property "Allow user to resize window" has been forbidden. LabVIEW 8.6

  • Error -51 when trying to copy file to windows server 2012

    When I try to copy a file from OSX to windows server 2012 share, it acts like its going to start and i get a pinwheel and finder is acting slow and finally error -51. although it does seem to copy over the folder with correct name but no files inside