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

learn more… | top users | synonyms

13
votes
2answers
21k 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
9k 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
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 ...
7
votes
3answers
15k 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 ...
5
votes
2answers
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
9k 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
2answers
64 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
15k 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
111 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
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
14k 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
3answers
2k 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
74 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
114 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
748 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
712 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
150 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
2k 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
10k 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
42 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
4answers
1k 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
378 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
2k 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
749 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
0answers
42 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
199 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
508 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
55 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
371 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
339 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
2k 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
4answers
8k 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
2answers
31 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
116 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
1answer
595 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
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
440 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
8k views

How to convert date field in single line of text using Calculated columns

I have created a calculated field for a content type in my Sharepoint 2010 and I want to return a date in the TEXT format because I am returning some text with it. The condition I have put in the ...
2
votes
2answers
6k 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" ...
2
votes
1answer
122 views

Using NOT on REST date query

I am able to filter for items created on a specific date with the following query (using today [03-06-2015] as an example): "$filter=Created ge datetime'2015-03-06T05:00:00.000Z' and Created lt ...
2
votes
1answer
4k 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
545 views

Access Uploaded Document's Original Creation Date in SP2010

I've spent some time searching this site and others but haven't seen a conclusive answer to this question: is there a non-code way to display the original creation date for an Office document in a ...
2
votes
1answer
2k views

Date column showing as “Date and Time” even though “Date Only” selected

In a workflow I have set up on a list, the email that is generated is showing a date with both date and time, with the time at 12:00:00 AM (using a lookup of one of the list's columns). Checking the ...
2
votes
1answer
479 views

Why is default ScheduledItem StartDate a 'weird' value?

If you create a new ScheduledItem object and look at the StartDate - it's 1/1/1990 - why? This has just caught me out when trying to evaluate whether the dates have been set or whether they're, what I ...
2
votes
1answer
3k views

JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours)

JavaScript SP.CamlQuery() return DateTime fields with offset (in my case +11 hours). In standart Display/Edit forms and views display correct DateTime. How to get correct DateTime via SP.CamlQuery()? ...
2
votes
1answer
747 views

Problems adding Date & Time values to a comparison using IF in a calculated column

I'm trying to compare a date by using =if([Modified]<DATE(2012,2,8),"Outdated","Updated") and it works just fine, but I have a problem with trying to add time to the comparison. What I need is to ...
2
votes
2answers
901 views

MOSS 2007 - Filter calendar to display currently running event

I want to create a view for a calendar. The view must display only currently running events. Right now, I can create a view that filter on for daily event : I currently filter events with Start Date ...
2
votes
1answer
34 views

Weekly Date Intervals

I am trying to get weekly start and end dates displayed automatically (as i am going to be pulling reports weekly, this will be helpful). For example, if today was monday 6/24 - would like to pull ...