View Complete Post
is it possible to create an index on a datetime field that just looks at the date part,
as I am constantly querying the table, using a where clause like this
or is there an more efficient method of achieving the same result?
Windows Server 2003, SharePoint Designer 2007, Windows SharePoint Services 3.0
I have a calendar list with start date(datetime1) and end date (datetime2). Each is the default column created by the calendar list in SharePoint. They both display a date and a time to choose from.
QUESTION: Is there a way to remove the date section of the end date in a custom list form so that the user can only pick an end TIME? Or, is there a way to force the end date (datetime2) to HAVE TO BE the same DATE as datetime1,
only allowing for a different time?
I have a dynamic data site that stores Event data using LINQ-to-SQL. When someone requests an event, it is first stored as a PendingEvent (which is a child of Event) with a column/attribute called receivedAt, which is [ReadOnly(true)] and which is assigned in InsertEvent as shown.
partial void InsertEvent(Event instance)
instance.requestedAt = DateTime.Now;
This works fine. The event displays with the correct receivedAt date, and it's correct in my database. It shows up just fine on my Display, Edit, and List pages. However, if I try to delete, the receivedAt in the instance (retrieved with my debugger) in my delete function is 01/01/0001 12:00am, also known as DateTime.MinValue. My other dates appear correct.
If I remove "ReadOnly(true)" from the received at, everything works fine. Why won't "ReadOnly" allow me to have a time?Thanks in advance,
I forgot to mention why I care. I can't submit the instance to be deleted because DateTime.MinValue is outside SQL's available datetime, so I get a SQL error. The delete also takes place in a custom dele
Area_code (varchar) Loan_date (datetime)
USA 9/21/2009 12:00:00 AM
CAN 10/22/2010 12:00:00 AM
ARG 12/23/2009 12:00:00 AM
Area_code (varchar) Date_format(varchar)
I want to add Loan_date column in second t
I want to add Loan_date column in second table and nee
I have an MDX query which returns a date dimension values as below
02 Aug 2010
03 Aug 2010
04 Aug 2010
Is there a MDX function i can apply only to isolate only the date part of the values like 02 Aug, 03 Aug.
I can do this quite eaily in SQL using Datepart..but i wasn't able to find a similar function for mdx.
Thank you for your assistance.
But its not getting the correct time that entered on date time field. Its defaultly getting the current time on my system.
I want to display 24 hours time and date in SSRS & for that I am using Format(now,"MM/dd/yyyy HH:mm:ss") but I am using this expression in Parameter, where I need to define datatype of that parameter as DateTime, not string. For Expression Format(now,"MM/dd/yyyy
HH:mm:ss"), If I use DateTime datatype, It is showing error but working with String datatype.
I have parameter To Date and value of this parameter should be 10/11/2010 13:09:16 (To Date: 10/11/2010 23:09:16) , not in AP or PM format and datatype of this parameter, want to keep DateTime that I can select value from Calender.
Please suggest me how I can achieve this?. I don't want to do it in stored Procedure side, want to do it in report side.
Hello, I have a database field that I am pulling that is type string, but the format of each value is mm/dd/yyyy. I want to convert this to a datetime format (minus the time) so that i can compare this value to a parameter date range (begin date and
end date) that are type datetime so that i can use the calendar control in my report. i've tried in my select statement to use select.....convert(datetime, stringfieldname, 101), but I get an error that says "Conversion failed when converting datetime
to character string".
I am also open to converting the datetime parameters to strings to do the comparison, but not sure the best way to do this either.
In my datetime column, I have values that include both date and time -- they're time stamps of events that took place. When I try to get today's events, I can't just send MM/DD/YYYY because my query returns nothing as it's looking for events that took place
exactly at midnight on that date.
What is the most efficient way to specify date in my query so that I can send only MM/DD/YYYY but I get all events that took place on that day?
Visual Web Developer 2010 Express
ASP.Net and C#
My issue is that I am pulled three tables together using the Query Builder and I only want to show data where a specific date is greater than todays date. Here is what i have so far:
SELECT salesitems.sona, salesitems.sonitem, ZOverdueOrders.ZOOType, ZOverdueOrders.ZOOReason, salesitems.sduedate, salesitems.soitemstate
FROM salesorders INNER JOIN
salesitems ON salesorders.son = salesitems.sona LEFT OUTER JOIN
ZOverdueOrders ON salesitems.sona = ZOverdueOrders.ZOOSON AND salesitems.sonitem = ZOverdueOrders.ZOOSONI
WHERE (salesitems.sduedate > CONVERT(DATETIME, '2010-09-01 00:00:00', 102))
ORDER BY salesitems.sona, salesitems.sonitem
Where it says '2010-09-01 00:00:00' I want that to be the todays date.
Is this possible? Can anyone help please?
Thanks in advance for any help!!!!