2 Replies Latest reply: Sep 2, 2012 10:21 PM by Palani K S RSS

    Problem in the script?



      Attached is the script where I am facing problem. I am just using a column "Service Date ", to find out the months and further calculating employees based on that. But when i wrote the followin script in load , its not working:


      month(date#([Service Date],'MM/DD/YYYY')) as Cal_month


      I think it should display month and should work properly.


      Please help me figure out any error.


      Thank you




        • Problem in the script?

          Hi Yaman,

          I think you should use date() instead of date#() since the date()-function expects a number as first parameter, and date#() a text and I suppose the excel-interface "delivers" a number.



          • Re: Problem in the script?

            Hi Yaman,

            I notice the post is more than one year old. I know by this time, you would have resolved this simple aspect. Still I am replying as the status remains 'Not Answered'.


            Service Date is already loaded in your document as date only in mm/dd/yyyy format.

            So Date# is not required here as it is used to convert string to date. Date(Service Date, 'DD-MMM-YYYY') gives formatted date.