0
votes
1answer
84 views

SharePoint adds +1 to time when I set it

I have an issue with SharePoint date time field. Basically I have a date time field, and this field contains for example 19/12/2014 11:30:00. I would like to get this date and remove the time part, ...
1
vote
1answer
196 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?
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?
0
votes
1answer
169 views

Want my column display minutes and want it to sum in hours

I have an issue again... I create list from csvfile. I convert string with date into DateTime type like this: string[] formattedDates = { "dd.MM.yyyy HH:mm:ss", "mm:ss", "HH:mm:ss", "dd.MM.yyyy", ...
2
votes
1answer
283 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 ...
1
vote
2answers
942 views

How to set date field to Today's Date in Wss 3.0 Custom list form programatically

How can i pre-populate newitem.aspx form with today's date. When user adds new item i want to prepopulate date field with todays date. <SharePoint:DateTimeControl ID="dtcDateofInsp" ...
3
votes
1answer
399 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 ...
11
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"]); ...