Time Ago in Sharepoint announcement list

Hi techies,
I need to your help for implementing date in time ago format for announcement.
We are using XSLT for displaying announcements.
Is it possible to convert default date/time to time ago format or can we implement it in  a calculated column by using default date/time.

http://msdn.microsoft.com/en-us/library/dd583143(v=office.11).aspx#officesharepointddwrt_aboutddwrtnamespacereference
There are builtin functions that you can use to assist with DateTime.  Not sure if they satisfy the 'Ago' concept.
Steve Clark, MCTS |
Twin-Soft Corporation
Easy Bins Roll-off Dumpster Rentals in Northern VA
Specializing in:
  Driveway-sized, roll-off dumpster rentals in Fairfax VA |
Dumpster Rentals for Junk Hauling in Springfield VA
  Roll-off Rental Dumpsters in Annandale, VA |
Dumpster Rentals for Estate Cleanout in Alexandria VA

Similar Messages

  • How to add repeating comments features in Sharepoint Announcement List.

    I have a challange to add commenting features in Announcement lists identical to sharepoint blogs.
    When super user adds Announcement  in the team page, i wanna display add comments  right underneath the new announcement to  people with contributer access to provide feedback to the item. It is very identical as default sharepoint issues
    list where people can provide multiple comments that provides time stamp and user info about the contributor of the comment. 
    Any help will be appreciated.
    Thank You
    Napster123

    Hi Napster123,
    Please check this. It’s about how to add comments to SharePoint. I think Steve’s suggestion would be helpful.
    http://sharepoint.stackexchange.com/questions/495/how-to-add-comments-to-web-page-in-sharepoint
    Hope this helps.
    Thanks.
    Pengyu Zhao
    TechNet Community Support

  • How to create time column in SharePoint custom list.

    Hi,
    Actually my requirement is, I should create a Custom List in SharePoint which should has "Effort" column with the "Time" type.
    User Should enter only Hours and minutes in that field. How should i do it?
    By Default we can have "Date and Time" or "Date" alone. There is no feature to have only "Time" :(
    Thanks in advance.
    Poomani Sankaran

    you can use JSLink script for that. You can use text field attache JSlink script and change her client side rendering. some information and samples about client side rendering: https://code.msdn.microsoft.com/office/Client-side-rendering-JS-2ed3538a
    I's good because in worst case you will have pure SP text field. In case of migration to new version or cloud you will have no problems. 
    Even more you can attache Jquery UI Time spinner http://jqueryui.com/spinner/#time or you can download Time picker extension http://trentrichardson.com/2010/04/19/timepicker-addon-for-jquery-ui-datepicker/
    and create fancy time picking design.
    Tomas.

  • In SharePoint Calendar lists, fields [Start Time] and [End Time] do not exist at the Site Column level.

    <header style="box-sizing:border-box;color:#777777;line-height:1;font-size:13px;padding-right:46px;margin-bottom:3px;font-family:'Helvetica Neue', arial, sans-serif;">
    </header>
    I'm doing SP app development and have the following problem.
    I need to check Start time and End Time in SharePoint Calendar using CAML query and then add a new event to Calendar list using the Start time and End Time that user has entered in 2 datapickers
    in the form.
    function AddCalendarListItems() {
    var SD = document.getElementById("datepicker1").value;
    var SThh = document.getElementById("St1").value;
    var STmm = document.getElementById("St2").value;
    var ED = document.getElementById("datepicker2").value;
    var EThh = document.getElementById("Et1").value;
    var ETmm = document.getElementById("Et2").value;
    var T = document.getElementById("Title").value;
    var S1 = SThh;
    SD = SD.slice(6, 10) + "-" + SD.slice(0, 2) + "-" + SD.slice(3, 5) + "T" + SThh + STmm + ":00Z";
    ED = ED.slice(6, 10) + "-" + ED.slice(0, 2) + "-" + ED.slice(3, 5) + "T" + EThh + ETmm + ":00Z";
    //alert("SD= " + SD + " , ED= " + ED);
    var siteUrl = SiteCollurl + "/SharePointApp11";
    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Calendar');
    var ListItemCInfo = new SP.ListItemCreationInformation();
    var newEvent = oList.addItem(ListItemCInfo);
    newEvent.set_item("Title", T);
    newEvent.set_item("EventDate", SD);
    newEvent.set_item("EndDate", ED);
    newEvent.update();
    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQueryAddCalendarSucceeded2), Function.createDelegate(this, this.onQueryAddCalendarFailed2));
    function onQueryAddCalendarSucceeded2(sender, args) {
    alert("Success");
    function onQueryAddCalendarFailed2(sender, args) {
    alert('Add new item to the calendar failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    But I receive the following error:
    Add new item to the Calendar failed. Column 'Start time' does not exist. It may have been deleted by another user.
    I've checked and 'Start time' does exist. So it seems in SharePoint Calendar lists, field [Start Time] and [End Time]  exist but do not exist at the Site Column level.
    Please advise.

    Hi Khojasteh,
    Use “EventDate” for Start Time field, and “EndDate” for End Time field. They are the internal name of the two fields, you can check it in the column settings page url like “Field=EndDate”.
    If it isn’t the issue, please debug the code, in which line the error occurs.
    Thanks,
    Qiao
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Qiao Wei
    TechNet Community Support

  • In my email auto fill it lists addresses I haven't used in 2  years as "recent others". What causes this, the contact information for these people was deleted some time ago.

    In my email auto fill it lists addresses I haven't used in 2  years as "recent others". What causes this, the contact information for these people was deleted some time ago.

    Mail, Window Menu, Previous Recipients.
    Select the ones you don't want and delete them.
    If you want to add them to contacts, click that button.

  • Add an item into announcement list in site collec. and repeat the same in all the sub webs' announcement list without using event receiver

    hi,
    I have a requirement: in my site collection i have an announcement list. and in my site collection  some 600+ sub sites exist. sharepoint admin uploads an announcement into this rootweb's announcement list. now is there any way
    i can add the same announcement -which has title, description, date time etc .- to all the 600+ sub sites' announcement list?
    i know , if i write a list item event receiver i will be able to iterate through eacha nd every subweb of my site collec and add this item into those sub web's  announcement list. But, without writing an event receiver and creating and deploying
    another wsp and avoiding all those headache, is it possible to achieve this requirement?
    any other approaches are highly appreciated!

    Hi,
    As a workaround, we can create a winform application for admin use only to add the item to all the sub web's announcement list.
    Developing Sharepoint Windows Forms
    http://www.codeproject.com/Tips/566370/Developing-Sharepoint-Windows-Forms
    Best Regards,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • I just bough an iPad and all the apps that i have deleted long time ago still keep showing in purchased section of app store - most of them were free apps anyway .Its annoying that u cant delete them .Is there a way to delete them o

    I just bought the Ipad and even the apps that I have deleted long time ago keep showing in purchased list even though most of them are free.Its realy annoying to not be able to delete them .Is there a way to delete them or is Apple workign on fixing this problem?

    If you want to delete an app forever. 
    1st delete the app on your iPad and on any other iOS devices.
    2nd delete the app from iTunes on your PC.

  • I have Adobe Acrobat 9 Standard on both of my computers.  Some time ago, one crashed my computer and I had to reinstall the operating system and all applications.  After I had installed once Acrobat 9 Sdt in the computer, I wanted to update the software v

    I have Adobe Acrobat 9 Standard on both of my computers.
    Some time ago, one crashed my computer and I had to reinstall the operating system and all applications.
    After I had installed once Acrobat 9 Sdt in the computer, I wanted to update the software version 9.0.0 update to the same level as it was before the crash and that the other computer has version named 9.5.5.
    The system for update from version 9.0.0 does not work at all. "There are no updates" listed in the dialog.
    Can you advise how I get my Adobo Acrobat 9 Standard (Version 9.0.0) could be updated to the same level as the computer had before the crash.

    ftp://ftp.adobe.com/pub/adobe/acrobat/win/9.x/

  • How to populate a sharepoint 2010 list from the active directory. How to populate a sharepoint 2010 list with all sharepoint user profiles

    How to populate a sharepoint 2010 from the active directory.
    I want a list of all the computers in the active directory,
    another one with all users.
    I want also to populate a sharepoint 2010 list from the sharepoint user profiles.
    Thanks
    sz

    While
    the contacts list is usually filled out for contacts that are outside the company, there are times when you would use a contacts list to store internal and external resources.  Wouldn’t it be nice if you didn’t have to re-type your internal contacts’
    information that are already in the system?  Now you can with a little InfoPath customization on the contacts list. 
    Here’s our plan:
    Create the contacts list, and open in InfoPath
    Create a data connection to the User Profile web service
    Customize the form adding some text, a people picker and a button
    Create InfoPath rules that will populate the contact fields from the user fields in the User Profile store
    Let’s get going!  Before we begin, make sure you have InfoPath 2010 installed locally on your computer.  I also want to give credit Laura
    Rogers and Darvish Shadravan’s book Using
    Microsoft InfoPath 2010 with Microsoft SharePoint 2010 Step by Step.  I know it looks like a lot of steps, but it’s easy once you get the hang of it.
    So obviously we need a contacts list.  If you don’t already have one, go to the SharePoint site where it will live, and create a contacts list.
    From the list, click the List tab on the ribbon, then click Customize form:
    So now we have our form open in InfoPath 2010.  Let’s add our elements to the form. 
    Above all the fields, let’s add some text instructing users what to do with the the field we’re about to add (.e.g To enter an existing user’s information, choose the user below).
    Insert a people picker control by clicking the Person/Group Picker control in the Controls section of the ribbon.  This will add a column to the contacts list called group.
    Below the people picker, insert a button control from the same section of the ribbon as above.  With the button still highlighted, click the Control Tools|Properties tab on the ribbon. 
    Then in the Label box, change the text to something more appropriate to our task (e.g. Click here to load user data!).
    You can drag the button control a little larger to account for the text.
    We should end up with something like this:
    Before we can populate the fields with user data, we need to create a connection to the User Profile Service.
    Add a data connection to the User Profile Service
    Click the Data tab on the ribbon, and click the option From Web Service, and From SOAP Web Service.
    For the location, enter the URL of your SharePoint site in the following format – http://<site url>/_vti_bin/UserProfileService.asmx?WSDL.  Click Next.
    Note - for the URL, it can be any SharePoint site URL, not just to the site where your list is.
    For the operation, choose GetUserProfileByName.  Click Next.
    Click Next on the next two screens.
    On the final screen, uncheck the box for “Automatically retrieve data when form is opened”. This is because we are going to retrieve the data when the button is clicked, also for performance reasons.
    Now we need to wire up the actions on our button to populate the fields with the information for the user in the people picker control.
    Tell the form to read the user from the people picker control
    Click the Home tab on the ribbon.
    Click the button control we created, and under the Rules section of the ribbon, click Manage Rules. Notice the pane appear on the far right.
    In the Rules pane, click New –> Action. Change the name to something like “Query and load user data”.
    Leave the condition to default (none – rule runs when button is clicked).
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Click the Show advanced view on the bottom.  At the top, click the drop down and choose the GetUserProfileByName
    (Secondary) option.  Expand myFields and queryFields to the last option and highlightAccountName.  Click ok. 
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button. Again click the show advanced view link, but this time leave the data
    connection as Main. Expand dataFields, then mySharePointListItem_RW.  At the bottom you should see a folder called group (the people picker control we just added to the form).  Expand this, then pc:Person,
    and highlightAccountId.  Click Ok twice to get back to the Rules pane.
    If we didn’t do this and just queried the user profile service, it would load the data of the currently logged in user.  So we need to tell the form what user to load the data for.  We take the AccountID field from the people
    picker control and inject into the AccountName query field of the User Profile Service data connection. 
    Load the user profile service information for the chosen user
    Click the Add button next to “Run these actions:”, and choose Query for data.
    In the popup, for Data connection, click the one we created earlier – GetUserProfileByName and clickOk.
    We’re closing in on our goal.  Let’s see our progress.  We should see something like this:
    Now that we have the user’s data read into the form, we can populate the fields in the contact form.  The number of steps to complete will depend on how many fields you want to populate.  We need to add an action step for
    each field.  I’ll show you one example and then you will just repeat the steps for the other fields.  Let’s update the Job Title field.
    Populate the contact form fields with existing user’s data
    Click the Add button next to “Run these actions:”, and choose “Set a field’s value”.
    For Field, click the button on the right to load the select a field dialog.  Highlight the field Job Title.
    For Value, click the formula icon. On the formula screen, click the Insert Field or Group button.  Click the Show advanced view on the bottom. At the top, click the
    drop down and choose theGetUserProfileByName (Secondary) option.  Expand the fields all the way down until you see the Value field.  Highlight it but don’t click ok, but click the Filter
    Data button, then Add. 
    For the first dropdown that says Value, choose Select a field or group.   The value field will be highlighted, but click the field Name field
    under PropertyData.  Click Ok. 
    In the blank field after “is equal to”, click in the box and choose Type text.  Then type the text Title. 
    Click ok until you get back to the Manage Rules pane.  The last previous screen will look like this.
    We’re going to update common fields that are in the user’s profile, and likely from Active Directory.  You can update fields like first and last name, company, mobile and work phone number, etc.  For the other fields, the
    steps are the same except the Field you choose to update from the form, and the very last step where you enter the text will change.  Here’s what the rules look like when we’re done:
    We’re all done, good work!  You can preview the form and try it now.  Click Ctrl+Shift+B to preview the form.  Once you’re satisfied, you can publish the form back to the library.  Click File –> Quick
    Publish.  Once it’s done, you will get confirmation:
    Now open your form in SharePoint.  From the contact list, click Add new item.  Type in a name, and click the button and watch the magic happen!

  • How to create sub-folders containg my announcment list item's images , instead of saving all the images insdie a share folder

    Today i have found this issue which i was not aware of. i have a team site collection, and inside this site collection i have an announcement App. now when users create announcement items and they insert pictures inside the items , all the images are going
    to be saved inside the site asset folder , under the following shared folder :-
    Site Assets>>Lists-->>"List Name"-->>AllItems
    so in this case users might be adding images that have the same names and select to override existing file ,, so images in this way will start conflicting with each others. so is there away to force my announcement list to create sub-folder for each item
    , and to store all the item related images inside it ?
    for example in enterprise wiki site collection, each wiki page will have a sub-folder containing all its images... so can i have the same behavior inside my announcement list ?
    Thanks.

    Also i have noted something interesting , now when users attached files or images there are going to be stored under this directory:-
    .../Attachments/41/
    where 41 is the issue tracking item ID. so for attachments each item will have separate location so files with the same name inside different items will not conflict, which is great.
    while if the user insert a picture inside the issue item such as:-
    , it will be stored inside the shared folder under the "Site Assets" folder
    Site Assets>>Lists-->>"List Name"-->>AllItems
    ,, so images with the same name from other items will get conflict between each others.
    so attachments are being managed in the correct way, as each item will have separate location to store its attachments . while images inserted inside the item description, from all items are going to be stored inside the same folder !!! can anyone advice
    ??? this is a bug in SharePoint 2013 ?

  • Update item in SharePoint 2010 list when a entry made in SQL server

    Hi there,
    I have four lists on a SharePoint 2010 site. There is a column - Equipment Name - in each of the lists. I want only this column to be updated in all the lists, when a new entry is made in SQL server.
    I referred
    http://oszakiewski.net/eric/connecting-a-sharepoint-2010-list-to-external-database-table and found it good, however I want to only update one column and not to perform CRUD. Also, can it be possible to achieve this without referring to Central Administration
    settings?
    Thanks

    Hi,
    Let’s verify the following:
    Whether your four lists are external list with SQL Server data source. If not, you can’t sync the list with SQL Server.
    External list items are sync from data source, they keep sync all the time.
    Whether you aren’t want to perform CRUD in the list. You can select some of them instead of using all of them.
    You can create all of the column from the four lists in your SQL Server database table, and then create four external lists with that table as data source.
    Modify view-> in each external list check the columns which you want display in every list. Then you can update the “Equipment” column in each external list.
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • How to do simple form post to payment gateway from SharePoint 2010 list form OR InfoPath 2010 Web Form?

    Working on a SharePoint 2010 Ent extranet site where parents of students can submit field trip permission forms and make payment at same time (optionally if fees involved).  Was wondering if someone could advise (or point me to resource on) best way
    to do a simple form post to an external payment gateway?  Would be from InfoPath web form OR SharePoint 2010 list form.
    Any guidance would be appreciated.
    Trevor

    you may create a custom visual web part for this:
    http://www.codeproject.com/Articles/152280/Online-Credit-Card-Transaction-in-ASP-NET-Using-Pa

  • I have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    hi,
    i have a sharepoint custom list with Title and image attachments, now i want to display image attachments in div based on the title.

    i am using the below code only
     SPSite mySite = new SPSite("http://sharepoinsiteaddress");
    SPWeb myweb = mySite.OpenWeb();   
    SPList myList = myweb.Lists["Announcements"];   
    SPListItem myListItem = myList.GetItemById(1);   foreach (String attachmentname in myListItem.Attachments)
    String attachmentAbsoluteURL =    myListItem.Attachments.UrlPrefix // gets the containing directory URL
       + attachmentname;
       // To get the SPSile reference to the attachment just use this code
      SPFile attachmentFile = myweb.GetFile(attachmentAbsoluteURL);
       // To read the file content simply use this code
       Stream stream = attachmentFile.OpenBinaryStream();    StreamReader reader = new StreamReader(stream);
       String fileContent = reader.ReadToEnd();
    here i am using panel, how can i attach this attached image to panel

  • Unable to sync with SharePoint task list

    Unable to sync with SharePoint task list
     The SharePoint site is invalid - I can hit the site just fine through IE
    - The SharePoint site is unavailable. Not so since I can naviagte to it just fine with IE
    - The user does not have full or design permissions in the SharePoint site -- My permission level is "Full Control"
    All inside a corporate Lan.  This is a first time setup? Any ideas?

    Hi
    If you open up the project file from within the sharepoint list and then click sync what happens?

  • Upload multiple attachments in sharepoint 2010 list

    I want to have multiple attachment column in sharepoint list.is there any way to have this?
    I have one list and now I want to create a scenario that at a time user can attach more then one file like they do in Gmail.
    Can I achieve this using SharePoint 2010 list?

    Yes, those links for server object model.
    You can also do same with client object model:
    http://withinsharepoint.com/archives/111
    http://ranaictiu-technicalblog.blogspot.in/2010/06/sharepoint-2010-attach-files-to.html
    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

Maybe you are looking for