New answers tagged

3

Regarding the error you are receiving, if you are using different regional settings than English in your site, try to replace all the commas (,) to semicolons (;). You could make a easier calculation to. This one returns the number of days, hours and minutes between the 2 dates. =TEXT([Fin Diag]-[Debut Diag];"d:h:mm") Update Tried out your calculation ...


0

This might fulfill your requirements (no javascript needed - OOB solution) : 1.Add a new field of type calculated to the list and set it equal to the start date field (your formula should look like : =[name of the start date field]) set the return type of the calculated field to Date time (Date only) 2.reivew the list data to check that end date is set as ...


0

You can save below code in a JS file in a document library and set that file as JSLink to End date field: (function () { // jQuery library is required in this sample // Fallback to loading jQuery from a CDN path if the local is unavailable (window.jQuery || document.write('<script ...


1

I figured it out! I had to go into infopath->File->Form Options->Advanced->Edit Default Values->and uncheck the field causing the validation error->press OK->republish the form.


2

Change your calculation to =24*(start-end) and set the column type to Number with 1 decimal.


2

When you subtract a date field from another date field in a calculated column, the result is given in days. You can therefore multiply the difference by 24 to get the result in hours, so your formula would likely look like this: =24*(End-Start) Make sure to set your calculated column to return a number instead of text.


1

None of these answers work. Did anyone bother to test them? After looking elsewhere and working it out myself, here's what works: =TEXT([Start Date],"mm/dd/yy")&" - "&TEXT([End Date],"mm/dd/yy") You can adjust the way the date shows by using the mm/dd/yy part, which is intuitive.


1

You need to format the date like this: Server Site string date = SPUtility.CreateISO8601DateTimeFromSystemDateTime(inputDate); Sample for your case: inputDate = new DateTime(2016,04,18); string date = SPUtility.CreateISO8601DateTimeFromSystemDateTime(inputDate); Client Side (client object model) string date = ...


0

Use SharePoints own formatting function: String.format("{0:d}",new Date(oListItemResp.get_item('Created'))) For all formatting options, see: Changing date format using javascript


0

You can convert the date you get into js Date object: var date = new Date(oListItemResp.get_item('Created')); And then specify your own format as you want using js Date methods, for example: var yourDate = (date.getMonth() + 1) + "/" + date.getDate() + "/" + date.getFullYear(); See the answer to this question


0

You can convert the return object into a JavaScript date object as below var created = new Date(olistitem.get_item(...)); Now you can use Date functions to create string of your desirable format.


0

You can create column with 'date only' and then you can pass date directly in sharepoint format. _api/web/lists/getByTitle('ListName')/items?$select=Id,Title,Modified,Birthdate&$filter=Birthdate eq '2016-04-13' Its working fine for me (Tested on SharePoint online). For 'Date and time' Field we have to format using javascript in order pass in ...


0

While I have not found a code to replace the 5 minute increments in the time field, I did notice that once the transaction is logged, when you view in spreadsheet mode and click edit, you can then change the time to minute intervals by typing it in and saving. It will hold the time to whatever you type in.


1

How about using {Today-7} in your query?


0

You can use the SP.RegionalSettings.timeZone property from sp.js to get the server timezone. The LCID for the current context can be gotten directly from 2 variables: //as an int var lcid =_spPageContextInfo.currentLanguage; // or as a string var lcid = SP.Res.lcid;


0

I don't have privileges to comment so adding it as an answer. SharePoint stores the dates internally as UTC, so when you add any data you need to manually convert the time to UTC otherwise when added from a different time zone you'll always see a time difference.


2

You can do it by jslink. Make one js file (ex. ViewMonth.js) and add following code: Replace your column name instead of MonthNum and month (function () { var monthctx = {}; monthctx.Templates = {}; monthctx.Templates.Fields = { "MonthNum": { "View": setmonth } }; ...


0

Try this: Hours Calculation: =([COLUMN2] - [COLUMN1])*24 This will return the total number of hours between the dates


0

You can use the JavaScript methods like getUSTDate(), getUSTHour(), getUSTMinute(), getUSTMinute() to Get the Current UST date and Time. Please refer the Link Or you have to convert it manually using the below code function convertToServerTimeZone(){ //EST offset = -5.0 clientDate = new Date(); utc = clientDate.getTime() + ...


2

=MONTH( "January" ) will not return a value because SharePoint doesn't have a clue what you meant You have to convert the Month TEXT to a valid Number (january=1 in SharePoint) IF([column]="January" , 1 , [column]="Feb2" , 2 , ...


1

I was pulling the data for online Share-point 2013/ office 365. I used the above method. But It did not return the desired result. I had created the two sample record on with date "2 april 2016". When i use the above syntax, It always return me only one record. I had spent two days to get this work. I made the following addition in above filter. $filter= ...



Top 50 recent answers are included