Hi,
I am searching for a way to find the total no of hours:min between two dates.
My table design is as below:
EmployeeId | StartTime | EndTime | BreakPeriod |
Sample data:
100 | 2011-09-14 08:00:00.000 | 2011-09-14 15:30:00.000 | 30
I need to find the total no of hours:mm between these two datetime values. (excluding the breakperiod).
-----
...
Search Result
Collapse
13 results in 0.0040 seconds.
Keywords
Members
Tags
-
subtract two datetime values
-
Linq to sql problem
Hi all I get this error
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value
when using the below code. Any ideas please
var longtime = from d in context.DocketT Bs
//where (DateTime.Now.T oString("dd-MM-yyyy HH:mm:ss")) - Convert.ToDateT ime(c.Docket_Da teRaised + ":00") > TimeSpan.FromMi nutes(60)
... -
MS Charts Uniformed Date Axis Interval for Random Date Value Entries
Hi, just started playing with MS Charts today. Environment is CS Exress 2010, Target Framework is 4.0.
I am loading in a DataTable that includes Dates and Integers. Dates on X and Ints on Y.
What I have done is taken random readings from my meter over the last week in kWh and recorded them in a Sqlite database. I am pulling those records into the DataTable and using that as the DataSource for the chart.
... -
Could someone please explain dates in C# to me?
Hello,
I've been working with Dates today and the entire thing baffles my mind. I'm looking for an explanation of this simple code.
Code:DateTime date1 = new DateTime(2008, 6, 1, 7, 47, 0); Console.WriteLine(date1.ToString()); // Get date-only portion of date, without its time. DateTime dateOnly = date1.Date; // Display date using short date string. Console.WriteLine(dateOnly.ToString("d"));
-
Is it possible to rename table to datetime?
is it possible to rename table to datetime?
if yes, can anyone show me how?
thanks.. -
Implicit conversion from data type datetime to int
Hi, I'm trying to retrieve some information from my database, but somehow i get this error:
Behind code:
Code:public void binddata() { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter("getRoomNEquip2", con);
-
DateTime to string
Hello ,
I have an PHP page,
I have date stored in database with DateTime format, so i need to fetch it and append it to the string.
I am unable to do that........
So can you help me out.........
Thanks in advance..... -
Mysql DATETIME
I dont really have a problem, but I want to make my code faster and prettier.
I have some tables with DATETIME in it.
They have the std format %Y-%m-%d %H:%i:%s
I need them to be in %d.%m.%Y %H:%i format.
I tried to fix it with the server variable "datetime_forma t".
After reading a lot in mysql doc I found out that:
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.... -
From String to correct DateTime
So, I'm trying to do this...
DatumRodjenja_d b = DatumRodjenja.S ubstring(6, 4) & "-" & DatumRodjenja.S ubstring(3, 2) & "-" & DatumRodjenja.S ubstring(0, 2)
Where DatumRodjenja_d b is DateTime variable, and DatumRodjenja is String. And even after that, I'm still getting DatumRodjenja_d b in this format "DD.MM.YYYY ."
The thing is I need date in "YYYY-MM-DD" format because... -
MSSQL Datetime snafu
I have an mssql database that I need to migrate to mysql. For some reason though any queries to any columns of type datetime are returned in French in the following format:
7/avr/2004 14:00
This also includes all the text of an SQL dump which not surprisingly makes mysql unable to read the dump from the MSSQL db. I've checked that my windows regional setting is set to English. I'm at a loss as to why this is happening... -
garyb2008 started a topic Passing Time Value To Stored Proc in through Input Parameters property of Form. ADPin SQL ServerPassing Time Value To Stored Proc in through Input Parameters property of Form. ADP
Hello All
Ive been creating my first access project in Access 2000 and SQL Server. Its up and running now for 35 users and has been pretty much a success, though ive been stopped in my tracks quite often to figure out how to get these applications to talk with eachother.
Todays problem:
I want to pass time figures to a stored procedure using a forms Input Paramaters property, namely @StartTime and @EndTime (both are... -
Find Day from datetime
Hello there,
I'm trying to make a script that will recognize the exact day of a datetime value.
Example:
2008-12-03 00:00:000 => Wednesday
2008-12-04 00:00:000 => Thursday
2008-12-05 00:00:000 => Friday
etc...
Thank you for your time!!! -
Now() as DateTime default value
Hi.
I know this has been posted here before, but I couldn't find any answers.
I'm just wondering if you good people know a way to use the Now() function as the default value of a DateTime field, or anything that would give the same result, without having to use external scripts like PHP or ASP.
I do not want to use TimeStamp. I know it would get me similar results as using DateTime but with annoying side effects,...