Tag Info

New answers tagged

0

Your CAML query should look something like this ... <Query> <Where> <And> <Gt> <FieldRef Name="EventDate"/> <Value Type="DateTime"> <Today OffsetDays="-NumDays"/> </Value> </Gt> <Lt> ...


0

You are missing "FormatDateTime". In my case would be: ddwrt:FormatDateTime(string(ddwrt:Today()),1033,'dd') This link may be helpful too: Custom Date and Time Format Strings I hope this helps.


1

Try item["Modified"] = null; That should make the Date/Time field empty.


0

try this formula, hope it will work. =IF(AND(YEAR(opendate+90)<2014,MONTH(opendate+90)<5,DAY(opendate+90)<31),"8/31/2014",opendate+90)


1

var d = new Date("Wed Jul 23 01:00:00 UTC+0100 2014"); getFormattedDateWithOrdinal = function (date) { var d = new Date(date); var curr_date = d.getDate(); var months = new Array("January", "February", "March","April", "May", "June", "July", "August", "September", "October", "November", "December"); var ord = ""; if (curr_date == 3 || ...


0

You can try with code where you can change timezone based on current user login. You need to add custom feature on home page so code could identify current time zone and set proper regional settings for current application across the site. var loggedInUser = SPContext.Current.Web.CurrentUser; if (user.RegionalSettings != null) { return ...


3

I answered the question here (not exactly a duplicate, since that was in regards to the Search REST API, and I happened to give an answer for basic REST). Here is how you filter dates in REST: $filter=StartDate ge datetime'2014-01-01T00%3a00%3a00' This filters for items created after 01-Jan-2014, 00:00:00. So to filter between two date ranges, simply ...


2

This article explains REST filtering based on date, http://itblog.wolthaus.net/2011/12/rest-filter-datetime/. You'd want to pass in a date in YYYY-MM-DD format.


6

Since your "today" variable is a JavaScript date object, you can get the string representation by calling the toISOString() method. ...$filter=StartDate ge datetime'" + today.toISOString() + "' and ...


1

You can go to List Settings -> Validation Settings Mention there the validation you want, something like [X_Date] > [Created]


0

You can also use Asp:CompareValidator object instead of javascript. See sample code below <SharePoint:DateTimeControl runat="server" ID="txtFrom" DateOnly="false" /> <SharePoint:DateTimeControl runat="server" ID="txtEnd" DateOnly="false" /> <asp:CompareValidator ID="cv" runat="server" Display="Dynamic" ForeColor="red" Type="Date" ...



Top 50 recent answers are included