Represents an instant in time, typically expressed as a date and time of day.

learn more… | top users | synonyms

13
votes
2answers
23k views

Safest way to get a date from Sharepoint into a C# datetime field, using object model?

If I have a Sharepoint list item with a date field. How can I get the field value populated into a c# datetime object? For example: DateTime validfrom = Convert.ToDateTime(item["validfrom"]); ...
13
votes
4answers
10k views

CAML Now Instead of Today - CAML Bug?

I have a CAML query, in which the <Where> node looks like: <Where> <Leq> <FieldRef Name='PublishedDate'/> <Value Type='DateTime'> <Today/> ...
9
votes
4answers
20k views

REST API filter by start and end dates using 'today'

I'm new to filtering dates with REST in SP but am trying to do something like below but am not sure how to get today's date in as a variable into the request. I don't think I'm too far off so any help ...
9
votes
4answers
6k views

Caml to get today's birthdays

I have a list with birthday field (DateTime). How do I write caml query to retrieve only the records where birthday falls on today (i.e. only comparing day and month value of birthday column to ...
8
votes
2answers
7k views

Why is central admin time different from server time?

I have seen this question asked before (not here) but have never seen anyone with a genuine answer, usually people provide lots of info surrounding how Sharepoint has a different timezome for each ...
6
votes
2answers
10k views

Format Date using Javascript Object Model

I am using the javascript object model to get a date field back and display it on a page e.g. oListItem.get_item("MyTestDate") This displays on the page by default as: Thu Jul 25 09:30:07 PDT 2013 I ...
5
votes
3answers
2k views

DateTime list column with 1 minute increments

How can I change the time portion of a date time column to have 1 minute increments? When you create a coulmn by default it shows 5 minute increments, but I need to be able to use 1 minute increments. ...
5
votes
2answers
94 views

Sharepoint 2013 built in date validation

I'm trying to use the 2013 built in date validation. I want to make sure the date entered into the GoLive Date is not more that 10 days in the past. =[GoLive Date]>[GoLive Date]-10 How can I turn ...
4
votes
4answers
16k views

CAML query not working

I have written following CAML query to Retrieve items which are due in 7 days, It doesn't seems to be working, Please let me know what I missed ? string internalEndDate = web.Lists["List ...
4
votes
1answer
2k views

KQL for date range

I've a managed property datetime and i try to use a search for having the result in range. The issue is that i don't know how to format the date myManageProperty=01/02/2014..17/02/2014 but i don't ...
4
votes
4answers
16k views

How to set the Default value of a Date/Time column to next Friday?

I did some poking around in the documentation for Calculated field formulas, but I don't see anything that would help me do this. Does anyone know if it can be done? Can you point me in the right ...
4
votes
1answer
130 views

Calculated column increase date column by one day

I want to create acalculated column that takes a date field and sets the value to the date, increased by one day. How can this be done? For ex: If date field value: 20/10/2015 calculated result will ...
4
votes
4answers
3k views

Get difference in Minutes for DateTime format column

I have a formula for calculated column which gets the date difference in hh:mm format. =TEXT([COLUMN2]-[COLUMN1],"h:mm") But I want to get the difference in just minutes. I created very complex ...
4
votes
1answer
77 views

Boundaries in diagram with Date as X

I've recently been trying to build a line diagramm webpart with dates as X Problem is: I can't find a way to adjust the boundaries of the diagram which causes it to start in ~1900 At the moment it ...
4
votes
1answer
119 views

formula to limit date entries to specific month

In my "time off" custom list I have start date and end date. I want to make the user splits up the entries if the time off spans months. In other words if the entry starts Oct 25 and ends Nov 5 I want ...
4
votes
2answers
814 views

Set a date/lookup in ListInstance elements.xml

I have two lists. The first one has customers and the second one has Orders. Now i want to add some (test) data in the elements.xml of the listinstances. For customers this works without a problem ...
4
votes
1answer
74 views

How to modify DropDown Menu of a SPGridView?

I'm using an SPGridView to display search results (SP2010) and I would like to modify the way datetime column is displayed through the column menu. Schema are more meaningful than long speeches so ...
4
votes
1answer
768 views

SharePoint Bug? Conflict Error when saving a Page with a “Required” DateTime field in the page layout

I've just recently encountered a weird error / bug in SharePoint. Here is the scenario: I have a custom column "Test Date" that is of DateTime field type. The field is configured as required. It is ...
3
votes
3answers
270 views

Display current year on 2013 list

How do I display the current year on list date? Example picture below, only the items modified last year or before have the year displayed.
3
votes
2answers
8k views

Assigning Today() on a DateOnlyType field on InfoPath 2010

I made an InfoPath 2010 form using a SharePoint list template. The SharePoint list has a ReceivedDate field of DateOnlyType which I would like to set using the today() or now() on a "Set a field's" ...
3
votes
2answers
42 views

Concatenate two dates to one column

I am pretty basic user of SharePoint 2013 and I have this problem: I have to create a calculated column with two dates in them to look like this: From 21/2/2016 to 5/3/2016 but whatever I try, the ...
3
votes
4answers
4k views

Create a Current Date and Time Variable in SharePoint Designer 2013

Is there a way to set or create a date/time workflow variable with the current date and current time in a 2013 SPD Workflow?
3
votes
2answers
3k views

Possible to use DateOnly with the DateTimeField control?

I have a DateTimeField control that I would like to only display dates with. I tried setting the DateOnly member to true but when I try to save the page that is using this it throws the following ...
3
votes
4answers
11k views

DateTimeField and timezone conversion problem

It seems that the datetime value which is entered into a DateTimeField is always stored as UTC no matter what timezone is configured for the current user. Only the output on the page is displayed in ...
3
votes
1answer
85 views

Formula for getting Modified Date equal to Created Date instead of latest Modified Date

I'm creating a Time Out column wherein it stores the Modified Date/Time of a list. However, I just want to get only the latest Modified Date/Time that is the same Date as the Created Date. E.g. ...
3
votes
2answers
482 views

REST $filter when comparing 2 date columns causes error <nativehr>0x80070057</nativehr><nativestack></nativestack>

I'm using the on prem SharePoint 2013 REST API and I'm getting an error when I try to compare two date fields. $filter=ExpectedDelivery gt NeededBy The above query works perfectly using ...
3
votes
4answers
3k views

SP2013 Last modified date wrong in search results - day and month are inverted

We have a problem with the search results "Last modified Date". So if i take a look at the document and look at the last modified document i see "06/10/2014". This is correct cause the ...
3
votes
1answer
769 views

Making DateTime fields ignore user timezones

We have a number of forms using a standard DFWP to serve up some simple forms. A few of these forms have datetime fields only showing the date portion. We're experiencing some issues where user A in ...
3
votes
1answer
29 views

Sharepoint Jsom return wrong time

I have custom column, interview date, in custom list and I am storing date and time in column. When I fetch interview date data then it will return wrong time. If I store value in field 26 May 2016 ...
3
votes
3answers
99 views

SharePoint DateTime issue when date is saved using CSOM

The timezone set in SharePoint Online is EST and when it is being saved to SharePoint using CSOM/ECMA script from location with UTC +5:30 timezone the date is reduced. Everytime we edit the time is ...
3
votes
0answers
49 views

Filter content search by date and time of creation

I'm using a content search web part to show news on my site. I want to show the items following a publishing date and time. I know there's the parameter StartDate <= {Today}. How can I make it ...
3
votes
1answer
221 views

Range of minutes

I have a date field and time, and want to take this 5 minute interval in the select minutes, I want to be in sequence, example: 00,01,02,03,04,05,...55,56,57,58,59. How can this be done?
3
votes
4answers
3k views

Get SharePoint Server datetime

I was working on a functionality where we had to fetch list items from server using ECMA script (SharePoint 2010 Client Object Model) based on current datetime. The problem is that the datetime we ...
3
votes
1answer
545 views

“Changed On/Modified” columns - Date Format & Regional Settings

I was wondering if I change my regional settings through: Site Settings - Regional Settings - Locale: Dutch (Netherlands), affects the date format of the standard columns (Changed On/Modified e.g.). ...
2
votes
1answer
232 views

How to use powershell to change a datetime field to “Date Only”?

I made a sharepoint 2013 list in powershell, it has a date field, but I want the date field to be "Date Only" but I don't know how to do that in powershell code. Does anyone know? Thanks EDIT: ...
2
votes
2answers
36 views

How to set Date Time Column

I have a column in my List that is of type Date Time. By default I want it to display the Date as Created + 14 days. I tried the below in the column settings: HOWEVER, when I click OK I get the ...
2
votes
2answers
525 views

How to use relative DateTime format like '2 days ago'/'Thursday', etc

I am updating a list and it's views (put together by another developer) and am adding a new date column. Currently, there is/was an existing date column (in this case called Orig Due Date), and I ...
2
votes
1answer
386 views

Where is the mistake in workflow?

I have the following issue. To make the automatization of the process I need to fix the date & time for each process step. First I used the calculated column but it didn't work. I found suggestion ...
2
votes
1answer
3k views

Programmatically (C#) set date field to blank in 2010

I have tried setting my date field to an empty string ("") and setting it to "01/01/0001". Both returned the error "String is not formatted as date time". I have several thousand items across a few ...
2
votes
5answers
9k views

CAML Query Filtering with OffsetDays

I'd like to set up a CAML query in a Data View Web Part (DVWP) that works like this: If a date is not specified on the Query String, then show me items created in the last 30 days If a date is ...
2
votes
3answers
257 views

Set default value of Article Start Date to [Today] with CSOM

I'm struggeling with setting the default value of ArticleStartDate date-time column using PowerShell and CSOM. Bakground: I have a content type, used by a page layout, inheriting from Article Page ...
2
votes
2answers
39 views

Adding month to calculated value

I want to created a calculated column where I add 3 months to a date. This is what I have so far. =DATE(YEAR([Last updated]); MONTH([Last updated])+3; DAY([Last updated])); SharePoint produces and ...
2
votes
1answer
123 views

Can I output a date in French from an XSL file?

In my XSL file, I set my date like this: <xsl:value-of select="ddwrt:FormatDate(@Date, 2057, 3)" /> This gives me an English date like 07 April 2015. Can I get this date in French?
2
votes
4answers
2k views

How to show two dates in one calculated column

I'm using Sharepoint Foundation 2010. I have two columns, start date and ending date. I want to make calculated column which shows both of them in the same column. Everything is okay till I add both ...
2
votes
1answer
811 views

Calculating dates in sharepoint list

I have two columns in a list, one called 'start date' and one called 'renewal date' what I need is for the renewal date to default to a year after the start date, i.e. Start date = 07/09/2013 and for ...
2
votes
2answers
929 views

SP2013 javascript client object model - get server time

My client machine and server machine has time offset of 2:30 hours. So when I try to retrieve Date/Time field using JSOM, it gives time according to offset. oListItem.get_item("Modified"); So how ...
2
votes
2answers
2k views

Field Modified shows date, but no time

In a view of a document library I have the field "Modified" and this is showing only dates but no time. I would like to display the time aswell. From my understanding it is ill advised to alter this ...
2
votes
1answer
5k views

date filter of today in rest api

I have a caml query filter for one of my date-time field. <Leq> <FieldRef Name ='StartDate1' /> <Value Type ='DateTime'> <Today /> </Value> </Leq> Is ...
2
votes
1answer
478 views

How to convert date based on current users, using client side code

I have a date that I want to display to the user, and the format should be dynamic and based on the user. If I do this I get a format that doesn't fit every user. var prettyDate = ...
2
votes
3answers
11k views

Check for empty date in SPD Workflow

Question How can I check for an empty date condition in a SharePoint Designer Workflow? Background I have a list called "Project" with multiple date fields. I have a calendar called "Project ...