how to count time , if only one day left from db .??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sureshl
    New Member
    • Jan 2009
    • 23

    how to count time , if only one day left from db .??

    In the below condition , i need to run the time in decreasing order untill the date becomes equal..

    5:35:00 left
    5:34:30 left

    0:29:00 left

    Like this ...

    The W3Schools online code editor allows you to edit code and view the result in your browser


    ElseIf countdate = 1 Then
    Label1.text = "time count should be viewed"
    End If

    Code:
       currentdate = Date.Now.ToString("MM/dd/yyyy")
                Dim diffdbdate As DateTime = dr.Item("date")
                Dim diffdate As Integer
                diffdate = DateDiff("d", currentdate, diffdbdate)
                Dim countdate As String = Replace(diffdate, "-", "")
                If currentdate > diffdbdate Then
                    Label1.text =  countdate & "gdf"
                ElseIf countdate = 1 Then
                       i need to run the the time , in the decreasing order
                End If
  • maliksleo
    New Member
    • Feb 2009
    • 115

    #2
    Originally posted by sureshl
    Code:
       currentdate = Date.Now.ToString("MM/dd/yyyy")
                Dim diffdbdate As DateTime = dr.Item("date")
                Dim diffdate As Integer
                diffdate = DateDiff("d", currentdate, diffdbdate)
                Dim countdate As String = Replace(diffdate, "-", "")
                If currentdate > diffdbdate Then
                    Label1.text =  countdate & "gdf"
                ElseIf countdate = 1 Then
                       i need to run the the time , in the decreasing order
                End If

    please study this link for guide lines Time out
    maliksleo

    Comment

    Working...