locked
date conversion from sql to vb.net RRS feed

  • Question

  • User-458875980 posted

     

    1. DateAdd(mm, - 7*3, getdate())
    2. DateAdd(ss, - 1, getdate())

    Need to convert to vb.net

    Wednesday, March 14, 2012 10:29 AM

Answers

  • User-851967432 posted

    Dim

    s As String = DateAdd(DateInterval.Minute, -7 * 3, Now) & " - " & DateAdd(DateInterval.Second, -1, Now)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 14, 2012 10:38 AM

All replies

  • User-851967432 posted

    Dim

    s As String = DateAdd(DateInterval.Minute, -7 * 3, Now) & " - " & DateAdd(DateInterval.Second, -1, Now)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 14, 2012 10:38 AM
  • User-101068015 posted

    Hi

    Here is a good website that you can convert C# to vb.net.

    http://www.codechanger.com/

    Hope it helpful.

    Friday, March 16, 2012 3:01 AM
  • User839249405 posted

    Hi Rajesh,

     

    1 .  DateAdd(DateInterval.Minute, -7 * 3, Now)       ' It will subtract 21 minute from current time

    2. DateAdd(DateInterval.Second, -1, Now)             ' Suubtract one second from current time

     

    Just assign this two variable and make use of it.

    Monday, March 19, 2012 6:51 AM