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

learn more… | top users | synonyms

12
votes
2answers
13k 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"]); ...
10
votes
4answers
3k 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
3k 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
3answers
4k 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 ...
4
votes
4answers
8k 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
3answers
361 views

REST API filter by start and end dates

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 ...
4
votes
2answers
1k 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
2answers
3k 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
1answer
66 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
95 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
3answers
6k 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 ...
3
votes
4answers
5k 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
3answers
187 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 ...
3
votes
1answer
524 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
414 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
72 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
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
305 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
100 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
4k 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
1answer
184 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
174 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
1answer
231 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
299 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
340 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
3k 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
300 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 ...
2
votes
1answer
26 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
265 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
115 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
621 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
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 ...
2
votes
2answers
2k 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
22 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
258 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 ...
2
votes
1answer
414 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
1k 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
391 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
949 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
440 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 ...
1
vote
2answers
74 views

Calculated Column with time element

I know I've read that dates and time don't do well in lists. Does anyone know a workaround to create a calculated column that will bump the number up in the column by 1 every 24 hours. So the column ...
1
vote
3answers
155 views

In a Page. How to add a flag that inform last time a list was modified

I have a custom page like this : These are my links (refresh once a day. Last refresh time : **XXXXX** ) link1 link2 link3 And I have a custom list. I want to add "last modified time" or ...
1
vote
1answer
329 views

How to default a date field to a particular day of the week?

When a new list item is added, I'd like a date field (Date From) to be defaulted to Monday of this week, as well as another date field (Date To) to Sunday of next week (creating a 1 week span ...
1
vote
2answers
4k views

setting current date time in sharepoint form field (newform.aspx) sharepoint 2010

I am working on customizing the sharepoint list form (newform.aspx). So soon as the user opens the new form I want the Odate coloumn (date and time) to be filled automatically with the current date ...
1
vote
1answer
39 views

What is SP.dateTimeUtil.js?

I found SP.dateTimeUtil.js contains all date and calendar formats and modified one of them to customize display of dates but SP 2010 doesn't use this file anywhere. I need customized Calendar.aspx and ...
1
vote
1answer
236 views

Converting date from utc to regional setting (cultural info) of the site

I have a question, basically i have a date time which is by default in UTC, how do i programmatically convert it to a correct date time in regional settings of the site collection / or user?
1
vote
1answer
2k views

Date & Time column display strange value in disp form

I have created a date & time type of column in my custom list, I have selected date only as display format. I can just fill date in this field on new item form but when i see this field in display ...
1
vote
2answers
65 views

Find Interval Between Dates Problem

I have a very odd problem, one that's been baffling me for over a week now. I have a workflow designed to create a new task a set period of time in the future once a current task expires. These tasks ...
1
vote
2answers
113 views

Create SPList Metadata

I want to give a SPLists a Expiry Date so they are later deleted through a timerjob. The value is set by the user when they create a list through my functioning visual webpart. Is it possible to give ...
1
vote
1answer
1k 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 ...