"DatePart" Equivalent for a calculated list column

Hello All,
I need to break out dates from a calendar field into separate columns of month and year. In SQL I would just use DatePart, but I can't find a similar function for SP 2010 calculated columns. Is there a DatePart equivalent for calculated columns using just
the web interface?
Also, does anyone know where is the list of functions for calculated columns?
Thanks in advance for the support.
Alcide

Hi Alcide,
you should be able to do something like =Year([Date column]) for your Year column and =Month([Date column])for your month column
here is a reference of calculated field functions from Microsoft.
http://msdn.microsoft.com/en-us/library/bb862071.aspx
Please let me know if this helps,
Alex

Similar Messages

  • Report script command equivalent for @relative calculation command

    HI ,
    We have a calculation script which has a fix statement like below :
         FIX( Grade, "w/o LO", "Line Options", AtLaunch, @DESCENDANTS("470.92"), @DESCENDANTS("Price Item"), @RELATIVE("Total Region", 0) )
    We are trying to make a reportscript which gives us the format of the set of database being calculated.
    So we are tranforming the above calc script commands into equivalent report script commands. We are struck with the @Relative command.
    Can somebody tell us what is the equivalent report script command for @Relative calculation script function.
    Regards
    OKU

    There's no direct analogue, but you can use the <LINK command along with <DESCENDANTS and <LEV to get pretty close. See: http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/rwriter/link.htm
    JExport (if pre 9.3) or DATAEXPORT (if 9.3 or greater) may also be options and will in fact allow @RELATIVE to be used.
    Regards,
    Cameron Lackpour

  • Color coded calculated list column in content query web part

    I have a calculated column in a list for displayig color coded values using the link
    http://blog.splibrarian.com/2012/06/06/using-calculated-columns-to-add-color-coding-to-your-sharepoint-lists/
    Now for rollup i am using the lists to display them in a content query web part so i have updated the .webpart file and imported and added, made changes in the item style and uploaded ad finally inserted the web part in the page.
    But while diplaying hte custom column, it is being eing displayed as
    string;#<DIV style='font-weight:bold; font-size:24px; color:green;'>•</DIV>
    As you can notice it has appended string;# before the text. How do i avoid this? Thanks

    <xsl:value-of-select="@RAG" disable-output-escaping=“yes”
    />

  • Calculated List column with Now() function

    I am designing a Sharepoint list for recording entry and exit times. I have one column which has been set as time function with a calculation of =Now() a second column called [Out] with a Yes/No choice and a 3rd calculated column [Time Out] with a
    formula =IF(Out="Yes",NOW(),"On Site"). This works fine until you add data into other columns then the [Time Out] column keeps on changing time. How can I make the[TimeOut] column only show the time when the [Out] column changes to yes
    and keep that time.

    Hi
    another approach
    if first column represent the time when the item is creted, you don't need it. You could use [Created] column value
    Next, set [Out] columnn with default value NO, and next you can use 2 scenarios
    First one  -  you don't use the calculated column, you create a new one  [TimeOut], text column. with default value="On Site"
    You should also attacha  workflow to your list, which will start when an item is changed ( only in this case ! ) wnd which will analyse if [Out]=yes - in this case will fill [TimeOut] with string value for now() value
    Second one. you keep the calculated column, but the formula should contain converting datetime in string value
    More details about this formula for converting time in text
    http://msdn.microsoft.com/en-us/library/office/bb862071%28v=office.14%29.aspx
    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

  • I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    Oaky, at least we got that far.  Next step is to determine if all those "numbers" are really numbers.  Changing the format to "number" doesn't necessarily change the string to a number. The string has to be in the form of a number.  Some may appear to you and me as numbers but will not turn into "numbers" when you change the formatting from Text to Number. Unless you've manually formatted the cells to be right justified, one way to tell if it is text or a number is the justification. Text will be justified to the left, numbers will be justified to the right.
    Here are some that will remain as strings:
    +123
    123 with a space after it.
    .123

  • Why does the DB Tools List Columns.vi only report -1 for the defined column size?

    I am using LabVIEW 8.2.1 with the database connectivity toolset with an SQL Server 2000 database. I would like to see how large a full record could be, so I used the DB Tools List Columns.vi in the database toolset. It easilly displays the column name and the column type, but only returns a -1 for the defined size. Of course when I add up the defined size elements, it gives me -351, which is the number of columns in that particular table. The vi I am using is very simple. I open a database connection, retrieve the data, and close the connection. The retrieved data is an array of clusters. I index it by running it through a for loop, and unbundeling each of the three parameters, and reforming arrays at the end of the for loop. This is as about the simplest vi I have ever made, but only part of it works.
    Attachments:
    Table size.vi ‏23 KB

    SciManStev-
              I don't know if this gets you the functionality you want because I don't have access to your file, but I would have code it this way (see attached picture). I would have used a Array to Cluster.vi to convert the column info ouput array into a cluster so I could use Unbundle by name. I think this is what you are wanting because from what I see, you only access the file once everytime the VI runs (right?). Try this and let us  know how it works out. Thanks!!
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager
    Attachments:
    untitled.JPG ‏29 KB

  • Average Calculation for the Dynamically Changing Columns

    Hello Experts,
    We have to design the following scenario in a query in the query designer.
    Variable Selection = 0CALMONTH Range Value
    The Report Data should be as below
    For Example: 0CALMONTH = MONTH1 to MONTH3
    MONTH1--MONTH2--
    MONTH3
    Statistical Forecast %-- A%B%--
    C%
    MAPE--(A%B%C%)/3(A%B%C%)/3--
    (A%B%C%)/3
    For Example: 0CALMONTH = MONTH1 to MONTH5
    MONTH1--MONTH2MONTH3MONTH4--
    MONTH5
    Statistical Forecast %--A%B%C%D%--
    E%
    MAPE--(A%B%C%D%E%)/5(A%B%C%D%E%)/5----(A%B%C%D%E%)/5   .............
    In this report the number of columns will be dynamically changing depending on the 0CALMONTH range value and we need to calculate the MAPE value which is equal to the average value of Statistical Forecast %.
    Can someone please provide me the inputs on how to calculate the MAPE value for the dynamically changing columns.
    Regards,
    AVS Reddy

    Victor,
    I have this code here
    AVG(DESCENDANTS(COSTCENTER.H1.Currentmember,1))
    Working for me right now, without using the second parameter on the AVG function, and 1 for te descendants, and the first decendants of the current acount are not the base level of the hierarchy.
    And if you need to specify the lowest leves to get it to work something is wrong.
    Use the formula above and try optimizing you application.
    Best
    Leandro

  • List Column Validation Formula for Text

    I want to use the List Column Validation to prevent users from entering a period "." into a text field. If they try to save the list with a period in the text field the message would be displayed. What formula syntax will allow me to do this?

    Bob,
    You are correct, the validation formula needs to evaluate to true (valid) or false (invalid).  We could simplify the above even further by using =ISERROR(FIND(".",Title)).  The reason we can remove the "IF" portion of the formula is because
    ISERROR is already returning true when the FIND function fails to locate a period in the Title.
    The IF statement comes in handy at times and it takes 3 parameters.  The first is an expression to evaluate, the next is a value to return when the expression is true, and the last is a value to return when the expression is false.  Let's
    say you wanted the opposite and enforce all Titles to include a period.  You could change the above formula by simply reversing the position of the true/false values of the IF statement as follows:
    =IF(ISERROR(FIND(".", [Title])),FALSE,TRUE)

  • Unable to delete the list columns due to references - sharepoint 2010

    Hello All,
    I am unable to delete some list columns due to its reference. Actually I want to delete particular columns and create the same column name newly and I want to change the column type (calculated type) to single line text type
    but unable to do the delete or modification due to following error, somebody please help me soon
    and please see the snap for reference.
    Error:  Site columns which are included in content type cannot be deleted.  Remove all the references to this site column prior to deleting this

    Hello,
    Is there any data in list? It seems there is content type in list, which is referring this column, that's why you are not able to delete it. Could you please verify. If column added in content type then delete column from content type.
    Try this powershell to delete column:
    http://peterheibrink.wordpress.com/2011/12/09/powershell-delete-field-and-all-references/
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • How do I use the context of the column as part of my calculated measure/column?

    Hello,
    I've struggled with this for a week now.
    I need my calculation to take the context of the column that it's in and use that value as part of a lookup/filter with which to do an operation.
    I basically want to add up the "Value" of all the "ORUs" associated to a Manager(MGR).  But since the ORU's are spread across many managers, I need to calculate the Value
    for an "ORU" and multiply by the "Percent" ( of people that who belong to that ORU for that MGR).   The difficulty is that the MGR(and associated Percent) is one table which is connected via the ORU.  There's no way connection
    to the MGR except by the Column Context.  So, how do I get to it for the calculation? 
    I'd like: CALCULATE(SUM(ORUBUMGR[Percent], FILTER (ORUBUMGR, ORUBUMR[MGR]={This column's header value!})
    pseudo-code would be:
    For each cell in the Pivot table
        SUM
           For each ORU
                  Percent= Look up the multiplier for that ORU associated with the Column
                  SUMofValue = Add all of the Values associated with that Column/Row combination
                  Multiply Percent * SUMofValue
    What won't work is:  CALCULATE(SUM(ORUBUMGR[Percent]), ORUMAP)*CALCULATE(SUM(Charges[Value]), ORUMAP)
    because you're doing a sum of all the Percentages instead of the sum of the Percentages which are only associated with MGR (i.e., the column context)
    The alternatives I can think of is doing a cross join between the tables so you end up with a copy of "Charges" for every row in ORUBUMGR...but while that would work for the example, it
    won't scale as my actual Charge table is quite large.  It'll also end up being quite complicated.  Or, having a column for each MGR where the lookup to the Percent is hardcoded into the calculation...but that also seems complicated and won't scale
    when I want to do future changes. 
    I'd appreciate any assistance...even a "that's impossible".
    Kind Regards,
    Alex
    Link to the XLS on onedrive
    _https://onedrive.live.com/redir?resid=67E698690736D027!3358&authkey=!ADU5F41Sg08Ygm0&ithint=file%2cxlsx
    Link to image showing data and what the pivot answer should look like _http://i.imgur.com/2HC7Lk7.png
    Link to image showing the data model  _http://i.imgur.com/KK3b61v.png
    (I'm waiting to be verified..)

    Yes, you're right, my calculation first attempt only works if the ORU and MGR are on the rows. :(
    I came up with a 2 step calc which is similar to the final calc posted by ImkeF although maybe a little cleaner. It uses a many to many pattern to calculate the ChargeAmt and then a SUMX to iterate over the ORUBUMGR table and apply the percentages.
    ChargeAmt:=CALCULATE(SUM(Charges[Value]),ORUMAP)
    Amt2:=SUMX(ORUBUMGR, ORUBUMGR[Percent] * [ChargeAmt])
    You can roll these into a single measure, you just have to wrap the expression from [ChargeAmt] in another calculate so that it does both the many to many calc and the transition from filter context to row context
    Amt3:=SUMX(ORUBUMGR, ORUBUMGR[Percent] *CALCULATE(CALCULATE(SUM(Charges[Value]),ORUMAP)))
    Personally I think I'd go with the two measure approach (even if you end up hiding [ChargeAmt]) as I think it's easier to read and will be easier to maintain.
    http://darren.gosbell.com - please mark correct answers

  • Jquery tooltip for sharepoint 2013 list (newform.aspx)

    I am looking for a simple solution/jquery tooltip for SharePoint list form fields.
    Something like below , but this one displays static text for each column and want tooltip text for each of my list column
    <script type="text/javascript" language="javascript" src="/wz_tooltip.js"></script><o:p></o:p>
    <a href="#" onmouseover="Tip('(This is test tooltip )');" onmouseout="UnTip();">
    Thanks in advance!
    <o:p></o:p>
    Amrita Talreja

    When you assign "Description" for every field in sharepoint list.SharePoint by default show this desc in a span just below the field control , like this.
    <span class="ms-metadata">This is simple desc</span>
    What you can try in jquery/javascript is to -
    - Search for this span [class="ms-metadata"] in your form table (table[class="ms-formtable"])
    - save its text() in a variable - var txtDesc = $("span selector").text();
    - Hide this span -$("span selector").hide()
    - Now you have dynamic desc message , you can add this as an "Title" attribute to your field control (textbox and other control)
    - $("your field control selector").attr("Title", txtDesc );
    Or can add a hyperlink for this -
    <a href="#" onmouseover="Tip('"+ txtDesc +"');" onmouseout="UnTip();">
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • How to display a percentage sign in calculated member column?

    Hello all,
    in my report I have a calculated member column whose value is determined by follwing value formula:
      if CurrentColumnIndex - 2 = 1 then 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-3, CurrentSummaryIndex)) * 100 
        else 
            If GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex) = 0 then 
            0 
            else 
            (GridValueAt(CurrentRowIndex, CurrentColumnIndex-1, CurrentSummaryIndex)/ 
            GridValueAt(CurrentRowIndex, CurrentColumnIndex-5, CurrentSummaryIndex))*100 
    Returned is a numeric value and it is being correctly displayed in calculated member column. As the value should represent percentage, I need to display a % sign after every value.
    How would I achieve this? I have seen a thread here in the discussion where approach with a formula and DisplayString function is mentioned - but there are no details how this could be achieved....
    The crosstab in question looks like this:
    Calculated Member is based on "REV_TOTAL" group column.
    I also attached the .rpt file (renamed to .txt for upload)
    Many thanks in advance,
    Marin

    Hello Raghavendra,
    thanks for the quick reply.
    Unfortunately it is not as easy at it seems - calculated member column is not showing in report designer and I can not apply the suggested approach with formatting toolbar...
    The column only shows here (right click on table ->  "Advanced Calculations" -> "Calculated Member...") and there is no possibility to format it directly:
    Any other suggestions?
    Many thanks,
    Marin

  • Validate list column based on entry from another column

    Hi there
    I would like to ensure that a value is entered in list column B, if there is a value of 'Yes' in list column A.
    I assume this formula is entered in the Validation settings of the list, but cannot work out what is required.
    Is it something like?     =IF([Col-A]="Yes",IF(LEN([Col-B]<1,TRUE,FALSE),TRUE)
    Thanks
    Asher
    Fast, Cheap, Good. Choose any Two!

    Ahh, found a solution:
    =IF([Col-A]="Yes",IF([Col-B]<>"",TRUE,FALSE),TRUE)
    Now i need to do the same for other fields in the list, and these formulas must go together in the validation settings of the list, which is going to look messy.
    If i want to do the same with columns C and D, how would i append this to the formula?
    =IF([Col-C]="Yes",IF([Col-D]<>"",TRUE,FALSE),TRUE)
    Thanks
    Asher
    Fast, Cheap, Good. Choose any Two!

  • WHERE ... IN ... SELECT records for a given list of PKs (or FKs)

    Hello folks,
    Many times we need to retrieve records for given lists of PKs (or FKs), as:
    p_pk_list := '11,22,33';
    We work in 10g
    A co-worker of mine had a good idea (I thought) to "help" the optimizer and build a recordset in the FROM clause and use it later in WHERE
    SELECT ...
    FROM tableName a,
    (SELECT REGEXP_SUBSTR(p_pk_list, '[^,]+',1,ROWNUM) p_pk_id
    FROM dual
    CONNECT BY ROWNUM <= LENGTH(p_pk_list ) - LENGTH(REPLACE(p_pk_list ,','))) d_pk
    WHERE
    a.ID=d_pk.p_pk_id; -- (1)
    The tragedy is that it takes 4 seconds to retrieve 5 records from the table (no other joins). The table has about 40 columns though and there are about 51000 records. With the SELECT REGEXP_SUBSTR in the WHERE clause, it's a bit worse.
    If (1) is replaced by:
    a.ID IN (11,22,33,44,55);
    the execution takes 0.04 seconds.
    My questions are:
    1. Is this a bad idea to select records for a given list of PKs or FKs? Should one just go for one PK/FK instead?
    2. Why the stiff performance penalty?
    3. Ideally, it would be nice if this would work:
    a.ID IN (p_array);
    where p_array would be an array of integers
    Any elegant sollutions?
    Thanks a lot.
    Dan

    Check the explain plan for both statements.
    I would wager that the overhead you experience is due to the fact that you are comparing apples to oranges here.
    (SELECT REGEXP_SUBSTR(p_pk_list, '[^,]+',1,ROWNUM) p_pk_id
    FROM dual
    CONNECT BY ROWNUM <= LENGTH(p_pk_list ) - LENGTH(REPLACE(p_pk_list ,','))) d_pkreturns a string.
    a.ID IN (11,22,33,44,55);Is a list of numbers.
    If you check the explain plan for the regexp version, you should see an implicit conversion being done for you (converting the number column into a string for comparison) which means you can't use any indexes defined on a.id.
    If you want to use an array of numbers here's an approach using a built in array of numbers.
    declare
       v_number_list  sys.odcinumberlist   default sys.odcinumberlist();
    begin
       v_number_list.extend;
       v_number_list(v_number_list.count) := 100;
       v_number_list.extend;
       v_number_list(v_number_list.count) := 200;
       for vals in
          select *
          from all_objects
          where object_id in
             select column_value
             from table(cast(v_number_list as sys.odcinumberlist))
       loop
          dbms_output.put_line(vals.object_name);
       end loop;
    end;
    25  /
    I_TYPED_VIEW1
    I_NTAB2
    PL/SQL procedure successfully completed.
    ME_XE?Otherwise do an explicit TO_NUMBER on the regexp query so that you can use any indexes defined on the table in question.

  • Can I perform a lookup to verify the value of a variable is contained in another list column?

    I am working in Sharepoint Designer and am trying to figure out how I can set a condition in an approval workflow to only complete a task if the value of a variable is contained in another list column. So if I had a list called A with column
    A1 and I am  working in the approval workflow, I only want the approval to complete if my variable is equal to any value in list A column 1. Otherwise I want to keep the approval task pending. I am very new to sharepoint so any help would be appreciated.
    Thank you.

    Hi,
    You can use the condition "if any value equals value". Please  refer below links for reference.
    http://office.microsoft.com/en-in/sharepoint-designer-help/workflow-conditions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376962.aspx
    http://www.codeproject.com/Articles/125120/Step-by-Step-Guide-in-Developing-your-own-Workflow
    Best Regards,
    Pavan Kumar Sapara.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem.
    s p kumar

Maybe you are looking for

  • Error reading a Excel sheet in BDS

    Hi Team, I have uploaded an excel sheet in BDS by OAER. Now in my program I want to read the excel file. I am putting the code snippet. DATA;       l_v_proxy   TYPE REF TO i_oi_document_proxy,       l_v_control TYPE REF TO i_oi_container_control,    

  • Change the display name of the Profile Manager Portal?

    Hello. Does anyone know if it's possible to change the name that's displayed on the Profile Manager User Portal? It's using my server name and I'd rather it be something a little more generic? Is this possible? Thanks, Kristin.

  • IPod Nano + Sony personal audio system - how to get radio to play?

    We got a Sony RDP-M7iPN personal audio system - that's a good thing. But the iPod Nano won't play radio if the headphones aren't plugged in.  When it's docked on the Sony system, it won't play radio and there's no way to get a headphone jack plugged

  • Subsequent Credit / Debit memo

    Hi SAPERS, Please provide me some clarity on In Logistics invoice verification: What is Credit memo, in which business scenario it will happen? What is Subsequent Credit memo, in which business scenario it will happen? What is Subsequent debit memo,

  • Jobs in a physical standby??

    Hi! I have been looking for any post for info, baut i didn't find anything. Do you know if the jobs created in the primary database are in the physical standby?? i don't know whow i can see they, because the dba_job table doesn't works in a physical