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

learn more… | top users | synonyms

11
votes
2answers
11k 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
2k 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/> ...
7
votes
2answers
2k 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 ...
5
votes
3answers
3k 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
6k 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
2answers
868 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
1answer
62 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
87 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
4k 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
2answers
2k 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 ...
3
votes
4answers
4k 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
79 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
462 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
369 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
47 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
1k 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
259 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
169 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
109 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
267 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
208 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
2k 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
65 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
24 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
138 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
105 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
502 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
18 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
300 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
361 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
0answers
433 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
40 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
1answer
126 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
3k 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
3answers
3k 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 ...
1
vote
1answer
145 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
103 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
730 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 ...
1
vote
2answers
712 views

Display and Sort on Date and Time Managed Property

I'm using a CoreResultsWebPart to display the latest articles in a short list. To display the last modified Date and Time I've created a Managed Property called LastModifiedDateTime (I'm aware of the ...
1
vote
1answer
1k 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()? ...
1
vote
1answer
4k views

Add a last modified date column for each row in Sharepoint 2010 list

I have a list where I have some columns, my requirement is that I need to add a column, which will update the last modified date for each row. That is if I edit one row today, add today's date to ...
1
vote
3answers
242 views

Calculate the difference between system columns Created on and Modified on

I'm trying to create a new column in a shp list that contains the difference in days between two other columns in that list. These two columns are the custom list columns that contain the date Created ...
1
vote
1answer
146 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 ...
1
vote
1answer
830 views

sharepoint date column calculation

This is my first day using SharePoint and I was lost in trying to figure out how or if it can be done, custom column calculations, and if code is allowed in SharePoint? I am using SharePoint 2010. I ...
1
vote
2answers
963 views

CAML OffsetDays

please help if it possible that CAML OffsetDays is not working in DvWP? I use the following CAML within a DVWP: <View><Query> <Where><And> <Lt> <FieldRef ...
1
vote
1answer
820 views

Sharepoint Designer add time to date action

Is there any documentation on how SP adds time to a date? For example, if I add one month to today (say it's the 31st), does SP return the last day of the next month (the 30th)? What about leap years? ...