商务时间计算 [英] businees hours Calculation

查看:87
本文介绍了商务时间计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看使用jquery插件获取日期时间的代码

See the code which get datetime using jquery plugin

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="test1.aspx.vb" Inherits="gfln1.test1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
</head>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
  <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/ui.all.css" rel="stylesheet" type="text/css" />
 <script src="http://projectcodegen.com/jquery.ui.datetimepicker.js" type="text/javascript"></script>
  </head>
  <script type="text/javascript">
  $(function() {
  $('#TextBox1').datetimepicker();
  $('#TextBox2').datetimepicker();

  });
  </script>

<body>
    <form id="form1" runat="server">
    <div>

        Enter Start Date/Time<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        Enter End Date/Time<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        Enter Conference days<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
         <br />
          <asp:Button ID="Button1" runat="server" Text="Calculate Hours For businees" />

    </div>
    </form>
</body>
</html>



现在我需要从datetime获取时间并获取小时,如何做到这一点,我几乎没有几行代码,但是无法从两个时间获取持续时间(请注意,只是没有日期).



Now i need to get time from datetime and get hours, How to do this, I have few lines of code but unable to get duration from both time (mind it just not date).

Dim s1, s2 As DateTime
       s1 = DateTime.Parse(Me.TextBox1.Text)
       s2 = DateTime.Parse(Me.TextBox2.Text)

推荐答案

(函数(){


('
('#TextBox1').datetimepicker();


(#TextBox2').datetimepicker(); }); < / 脚本 > < 正文 > < 表单 =" form1" runat >服务器" > < div > 输入开始日期/时间< asp:TextBox ID =" 运行率 =" < > 输入结束日期/时间< asp:TextBox ID =" 运行率 =" < > 输入会议天数< asp:TextBox ID =" runat =" < > < br > < asp:Button ID =" runat 服务器" 文本 计算商务时间" / > < /div > < /form > < /body > < /html >
('#TextBox2').datetimepicker(); }); </script> <body> <form id="form1" runat="server"> <div> Enter Start Date/Time<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> Enter End Date/Time<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> Enter Conference days<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> <br /> <asp:Button ID="Button1" runat="server" Text="Calculate Hours For businees" /> </div> </form> </body> </html>



现在我需要从datetime获取时间并获取小时,如何做到这一点,我几乎没有几行代码,但是无法从两个时间获取持续时间(请注意,只是没有日期).



Now i need to get time from datetime and get hours, How to do this, I have few lines of code but unable to get duration from both time (mind it just not date).

Dim s1, s2 As DateTime
       s1 = DateTime.Parse(Me.TextBox1.Text)
       s2 = DateTime.Parse(Me.TextBox2.Text)


这篇关于商务时间计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆