Tag Info

New answers tagged

0

Check your Site Columns definition; when I look at a Modified column in a document library, I see date and time. Either Site Column or Site Content Type (I believe Site Column is the driver), check your params. Column Name: Date Modified (from Existing Core Document Columns) In additional column settings: Date and Time Format: **Date and Time**


0

Here you go: Function Do-WhatOPAskedFor { param ( [Microsoft.SharePoint.SPList] $list ) # Please note that this is a bad way of getting all items from the list! $items = $list.Items $items | Align-DateFields "Modified" "Date Last Saved" } Function Align-DateFields { param ( [string] ...


1

The point is that formula expression is usually language dependent. For example, is site locate is set to 1033 (English - United States), then the formula you have provided in the question is absolutely correct: Syntax: TEXT(value,format_text) Source But let's say the site locate is set to 1049 (Russia), in that case the proper syntax would be: ...


0

Instead of creating a calculated column with the same data in text format, you can use Client Side Rendering and JSLink to create javascript Date objects for each Modified column value and format the date to your preference such as var modified = $(selector).text(); var date = (new Date(modified)).format("MMMM dd, yyyy");


0

I don't know about the lookup field but for date field you can write this way: <Row> <Field Name="Id">1</Field> <Field Name="Date">2011-12-30T21:00:00Z</Field> </Row> Refer this discussion for more details.


1

You're using TEXT, which makes it un-sortable. You'd have to be using =DATE(MONTH(Modified),DAY(Modified),YEAR(Modified)) or similar. I doubt you can get the behavior you're looking for with the 'long month' without setting all your dates to this format (regional settings).


0

You can still sort by the Modified field, which is indexed and very well suitable for sorting.


1

Similarly, I was asked to set a field as the "Second Thursday of Next Month." Using this post as well as some other tricks I already know, I was able to come up with a formula (shared if other users get the similar request): =DATE(YEAR(Today),MONTH(Today)+1,(5-MOD(WEEKDAY(DATE(YEAR(Today),MONTH(Today)+1,1)),7)+8)) Because you aren't adding the values to ...


0

SharePoint stores its datetime fields in UTC time. If you don’t look at the data from SharePoint through the UI (the UI corrects datetime values according to local time), you need to correct the datetime fields with the UTC offset you have locally. http://itblog.wolthaus.net/2011/09/sharepoint-stores-dates-in-utc-time/ ...


0

You can use the below code for DateTime field formatting for results you get through CAML Query: DateTime dtDate = Convert.ToDateTime(list["DateTimeField"]); spnDate.InnerText = dtDate.ToString("dd-MMMM"); DateTime Formatting reference link in c# : http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx



Top 50 recent answers are included