Tuesday 20 August 2013

Monday 19 August 2013

Sunday 11 August 2013

Sunday 7 July 2013

Thursday 4 July 2013

Wednesday 3 July 2013

Tuesday 2 July 2013

Date Difference Am to Pm Visual Basic.NET


Instructions To Operate Date Difference Am to Pm 

* First Enter Date 'Hr', 'Min' and 'Sec' TextBox In First Row
* Also Choose "Am/Pm" from ComboBox In first Row
* Now Put Check Mark on  "Submit checkbox "
* Similarly Enter 'Hr', 'Min' and 'Sec' TextBox In Second Row
 * Choose "Am/Pm" from ComboBox In Second Row
* Then click on Submit checkbox in second Row

NOTE :- It is must to Click on Submit ChekBox After Entering Data at Respective Rows

* Finally click on "Get Date diff" Button .


Download Date Difference Am to Pm App

Download Date diff

Working Date Difference Am to Pm :-

1. In Fig.1 you can see the structure of Date diff App.

 . 


2. It also consist of combo Box To select Am/Pm Time . 



 3. After filling values in Text Boxes Its necessary to put check mark on check box "submit" .
 It display date entered .

 4. Finally click on Button Get date diff and it display date on Date-Diff labelled textboxes.

 CODE FOR Date Difference Am to Pm 


 
Public Class Form1
    Public gethr, getmin, getsec, gethr1, getmin1, getsec1, total1, total2, finaltotal, hr1, hr2, diffhr, min1, sec1 As Integer
    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
        If CheckBox1.Checked = True Then
            TextBox10.Text = TextBox10.Text + "-" + TextBox1.Text + "-" + TextBox2.Text + "-" + TextBox3.Text + "-" + ComboBox1.SelectedText
            gethr = Val(TextBox1.Text.ToString)
            getmin = Val(TextBox2.Text.ToString)
            getsec = Val(TextBox3.Text.ToString)
            total1 = (gethr * 3600) + (getmin * 60) + (getsec)
        End If
    End Sub
    Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
        If CheckBox2.Checked = True Then
            TextBox11.Text = TextBox11.Text + "-" + TextBox4.Text + "-" + TextBox5.Text + "-" + TextBox6.Text + "-" + ComboBox2.SelectedText
            gethr1 = Val(TextBox4.Text.ToString)
            getmin1 = Val(TextBox5.Text.ToString)
            getsec1 = Val(TextBox6.Text.ToString)
            total2 = (gethr1 * 3600) + (getmin1 * 60) + (getsec1)
            If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 1 Then
                total1 = total1 + 12 * 3600
            ElseIf ComboBox1.SelectedIndex = 1 And ComboBox2.SelectedIndex = 0 Then
                total1 = total1 + 12 * 3600
            ElseIf ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 0 Then
                total1 = total1
            ElseIf ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex = 0 Then
                total1 = total1
            End If
            finaltotal = (Math.Abs(total1 - total2))
        End If
    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ComboBox1.Items.Add("Am")
        ComboBox1.Items.Add("Pm")
        ComboBox2.Items.Add("Am")
        ComboBox2.Items.Add("Pm6")
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If finaltotal <= 60 Then
            TextBox7.Text = "0"
            TextBox8.Text = "0"
            TextBox9.Text = Math.Floor(finaltotal)
        ElseIf finaltotal > 60 And finaltotal < 3600 Then
            TextBox7.Text = "0"
            TextBox8.Text = Math.Floor(finaltotal / 60)
            TextBox9.Text = Math.Floor(finaltotal Mod 60)
        ElseIf finaltotal >= 3600 Then
            hr1 = Math.Floor(finaltotal / 3600)
            TextBox7.Text = hr1
            hr2 = hr1 * 3600
            diffhr = finaltotal - hr2
            min1 = Math.Floor(diffhr / 60)
            TextBox8.Text = min1
            sec1 = finaltotal Mod 60
            TextBox9.Text = sec1
        End If
    End Sub
End Class

Monday 1 July 2013

Friday 28 June 2013