.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

Date time field in list

Posted By:      Posted Date: November 16, 2010    Points: 0   Category :SharePoint


I have created a list with data time field. In the date time field,by default in minutes dropdown we are having 0,5,10.... with 5 as interval.

But I need to enter data time field as 11/16/2010 12AM 03.

How to change the intervals in minutes dropdown.


View Complete Post

More Related Resource Links

Updating a List item field value in a SPD Workflow is setting Date fields to null

Hello everybody,I faced a very weird behavior while creating a workflow in SPD against a Document Library.Here is the case:1- Create a document library in sharepoint site.2- Add a custom column of type DATE.3- Upload any document to the library4- Edit the item metadata and set the custom date field to any date you want.5- Now using sharepoint designer, create a very simple Workflow with only one action that updates the current item "Title" field to any value. (Note: In my case I set the workflow to start manually and not automatically)6- Save the workflow and then start it on the uploaded item.7- Now check the value of the date column after the workflow is finished.8- You will see that the Date field is Empty... (very weird)Notes:   1-This behavior will not appear on a standard list. it is only appearing in a Document library.  2- I am using WSS 3.0 SP2 + MOSS 2007 SP2. Also SharePoint designer 2007 SP2Did anyone face this situation and does it have a fix, or am I doing something wrong here... Please help.Regards,Maheed

Calculated date field displays differently in List View and Data View web parts

In SharePoint GUI I created a simple custom list with a calculated Date/Time field (Due).  The calculation is =[Created]+7.  I'm trying to display this data on a page using a DVWP.  But first, for testing purposes, I also created a second calculated Date/Time (TestCreate) field in my custom list that is simply =[Created]. In the List View from within SharePoint, the dates show as expected (for example): Created = 8/12/2010 3:45 PM Due = 8/19/2010 3:45 PM TestCreate = 8/12/2010 3:45 PM In SharePoint Designer, I added a Data View web part and the above three data elements (each configured to display mm/dd/yyyy hh:mm:ss tt).  I see the time displayed for the example list item as: Created = 8/12/2010 3:45:30 PM Due = 8/19/2010 10:45:00 AM TestCreate = 8/12/2010 10:45:00 AM I've tested a couple scenarios and the calculated fields always display five hours in the past (along with dropping the seconds).  It seems like the DVWP is returning the date in a different time zone (with no seconds).  The lcid is set right (1033).  I didn't see any time zone settings for the DVWP specifically.  I'm basically stuck.  Could someone help me figure this one out. Thanks.

How do I format a date time field in a CQWP to YY-MM-DD ?

Hi. I have been trying to get the date-time to look good for some time now, but have failed. I have a Content Query web part that picks up article pages from a page library. The pages contains a field called 'article date'. I want to show just the 'Title' and the 'Article date'. Doing this default gives me: My title 10-09-03 00:00:00 I want it to be: My title 10-09-03 Is this possible? I'm starting to realize that I probably have to edit the xsl styles for this webpart but if thats the answer, how do I do that? ThanksThomas Balkeståhl - Technical Specialist - SharePoint

Setting a date time field to now


Hi all

MOSS 2007 - Visual Studio Sequantial Workflow.

I have a field in an item that I want to update within my Workflow code.

Field Definition:

<Field Type="DateTime" DisplayName="Date Approved/Declined" Required="FALSE" Format="DateOnly" ID="{0c1d9bb7-52f9-4b83-8d26-eda6c9879921}" SourceID=

getting time and date from datetime field in javascript


Hello guys, I need to get hours from the difference between two datetime fields. I wrote the javascript which will get the date from datetime field.

But its not getting the correct time that entered on date time field. Its defaultly getting the current time on my system.

So do you guys have any idea. How to get time from date time fields. and how calculate hours between two datetime fields using javascript.

Workflow SPD: Set Today Date+Time to Column-field




I have a little question about settings specific today (Date + Time) value to a field/column within a workflow that is designed by Sharepoint Designer 2007.


I can manage to set the field to today() => but the time is always 00:00 houres.

I would like to set a specific field to the "exact" date+time when the workflow is running. (so choosing a fixed date+fixed Time isn't a solution either)


So I anyone could help me how I can do such "simple" task, I would be very pleased.






Time added to Detailsview TextBox Date only field


Does anyone know why a time stamp is added to a textbox field that is bound to a SQL 2008 date datatype field?

I can view the data in the database and, as expected, it only contains a date. When I bind the textbox to the db field it tacks the time '12:00:00 AM' to the end of the date?


display only the date (not time) from a sqlserver date field in dynamic data


I have some Date fields defined in my sqlserver database but these display with a time part as well (00:00:00).

how do i esnure that only the date part is displayed and not this redundant time?


Discrepancy in Calculated Field using Date/Time



I have a calendar item as part of my MOSS 2007 site and would like to show the events coming up in the next 30 days on my home page.  After some research I understand that I cannot filter on the Start Time field when I try to create a view, so I've created a new field called Event Begin that is a calculated field set to =[Start Time].  I can then create my view for the upcoming events by filtering on the calculated Event Begin column.


This works well, except for events that are marked as All Day.  In this case, the value of the Start Time shows midnight as the time (i.e. 1/11/2008 12:00 AM) which is fine, but the value of the Event Begin column shows the time 5 hours earlier (i.e. 1/10/2008 7:00 PM).  I am not subtracting anything when calculating the Event Begin value, so my initial thought is that I have a conflict between Time Zone settings somewhere.


I am Eastern Standard Time here in the US which is GMT-5:00, which would explain the 5 hour difference.  Unfortunately, I cannot figure out where the incorrect Time Zone setting might be.  Within my site the time zone is correct (under Site Settings >

Need help with filtering a list based on Date and Time




We are implementing a SharePoint list for our resources to provide information as to whether they will be in the office that day, working from home, etc..


All entries are supposed to be in by 8:30 am and a report is created at that time; however, there are always a few stragglers. 


I would like to create a

"Date&Time" column in list - set actual time and sharepoint's proposes wrong hour (eg. 17:00 instea


I created new column in list - Date and time (Date and time format: Date&Time, Default value: Today's Date)

The problem is, when I create new item in list, the default time is always set as next full hour, eg. now it's 13:15 or 13:31 ora 13:57 and in aspx form it's all the time 14:00. Obviously, I can change that date with 5 minut precision (13:05, 13:10, 13:15 etc.), but it's kind of annoying.

SharePoint Date Time Control logic for saving and retriving in List


Hi Friends,

     I am Ali, I need to set the SharePoint Date Time Control in my webpart.


1. When i am adding student details in Admission Form, ( Fields like Name, Class, data of birth, Date of Joining ...)

2. at Date Of Joining : here,  SharePoint Date Time Control should show the default date as (Sys date). 

For this i am using this :  

" DateTimeControl1.SelectedDate =DateTime.Now; "

it is working fine.

and For Saving " Date "  in list item From SharePoint Date Time Control i am using this :

listitem1["Date Of Birth"] = DateTimeControl1.SelectedDate.ToShortDateString();


3. When the user retriving the date from particular list, here Date Time Control should show the date, as what date he (student) was added in the list.

for Retriving date from List to SharePoint Date Time Control i am using this as below: But it doe

compare date field in sharepoint designer without considering time



I  set date1 field in sharepoint designer with “set field in current item” action. And in next step I want to compare date1 with another date field. With “if date1 not equal to date2”

although I set  “Date & Time Format” to “Date only”, my problem is sharepoint designer consider time ( although my condition is true ,I think its compare the time of my date field and cant go next step) and I don’t want it. I want to compare date filed only with date,

what should I do, that sharepoint designer only consider Date in Date field in action?

Thanx a lot.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

Built-in Functions - Date and Time Functions

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend