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

learn more… | top users | synonyms

13
votes
2answers
19k 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"]); ...
11
votes
4answers
7k 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/> ...
8
votes
2answers
5k 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
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 ...
6
votes
3answers
9k 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. ...
4
votes
4answers
13k 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
1k 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
2answers
7k 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 ...
4
votes
4answers
11k 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
73 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
107 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
626 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 ...
3
votes
1answer
85 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 ...
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
8k 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
2answers
206 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
703 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
169 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
1answer
599 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
4answers
2k 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
469 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
264 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
4answers
7k 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
165 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
1k 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
1answer
366 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
1answer
373 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
2answers
5k 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
2k 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
450 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
426 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
608 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
886 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
30 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 ...
2
votes
1answer
520 views

How would I take a date field and subtract 30 days to show the month prior to the original date

I have records that are modified each month. The site is used to display the previous month's information. However, to make sure that the information is correct, I want to use the date the ...
2
votes
2answers
137 views

Getting latest datetime from a splist

I have sharepoint list with data and one of the columns contains date ... how can i programmatically retrieve the latest date, the field is a Date And Time type?
2
votes
4answers
849 views

Issue with Sharepoint DateTimeControl

DateTimeControl is inside grid and I bind the grid inside !ispostback section, on row databound of grid I find that datetimecontrol and disable it. When button click event (outside of grid), the ...
2
votes
2answers
213 views

BCS Date Only field on Update Form

I'm tasked with finding a method for Updating a field that is defined as Date in SQL, but rendered as DateTime through BCS (as there is no Date-only type). On the Update form, I only want a Date ...
2
votes
2answers
3k views

How do I format the Custom Field DateTime?

I want to create a date input box. When you select a date, it puts it in the format dd/mm/yyyy using the following Custom Field. <Field ID="{3a521b04-fca1-4707-9134-fa4acd1456d8}" ...
2
votes
0answers
75 views

The upcoming leap second and SharePoint

Is there any known issues when a leap second occurs? Leap years seems to be fine but i have yet to find any information related to leap seconds and how it could possibly have any impact on SharePoint. ...
2
votes
1answer
37 views

List formula date conditional not working

I have a list that takes an Open Date and adds 90 days to set a due date: =[Open Date]+90 However, many of the Open Dates are years old. I've been asked to change it so that dates created before ...
2
votes
0answers
33 views

Different Times between View and DisplayForm in Calendar

The setup: I am using a default Calendar list in SharePoint 2010 Enterprise. The calendar is being used to track meetings in for a specific meeting room. The calendar has content approval required ...
2
votes
1answer
630 views

FormField value set with javascript, value lost on postback

I have a custom list of "requests" which need to accommodate a required time range for a single date (among other fields), so I added "start" and "end" columns of date and time type. I used designer ...
2
votes
1answer
2k views

Incorrect Modified Dates on SharePoint Online for clients in other timezones

I've run into a strange problem with SharePoint Online. When updating or creating entries in a list using the Client Object Model, the modified date on the affected list item seems to be stored with ...
2
votes
1answer
465 views

Set date field in newform to selected date on calendarview

I'm looking for a solution where I first select a date on the calendar-view, when I add a new item, the selected date should be filled in on a field in my newform.aspx. Is this possible out of the ...
2
votes
2answers
1k views

Filter an External List on a datetime Field

So I have an external list in SharePoint 2010 that connects to a SQL database and pulls the data successfully. I also have 2 filters defined along with a limiting (TOP) filter. The first filter is ...
2
votes
0answers
595 views

Should SharePoint Alerts automatically adjust for Daylight Savings Time changes?

We have a SP2010 farm that is up to the October CU. After the time change, some users report that alerts that were sending out at 10am are now being sent at 9am. I've googled a fair amount and found ...