datetime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DaveP

    #1

    datetime

    how to capture midnite
    i want to create log files based on change of day
    i was thinking seconds past midnite...

    tks DaveP



  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: datetime

    DaveP,

    What do you mean you want to capture midnight? Do you want to get the
    DateTime that corresponds to midnight of a current date? If so you can just
    use call the Date property to get the DateTime instance which correponds to
    midnight of that date.

    You can also call the TimeOfDay property to get the TimeSpan that only
    has the time component, which you can then convert to a number of seconds.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "DaveP" <dvs_bis@sbcglo bal.netwrote in message
    news:HucJi.12$P 21.9@newssvr19. news.prodigy.ne t...
    how to capture midnite
    i want to create log files based on change of day
    i was thinking seconds past midnite...
    >
    tks DaveP
    >
    >
    >

    Comment

    • Martin CLAVREUIL

      #3
      Re: datetime

      Hi Dave,

      The simplest way is to do with a timer control ticking each minute and
      to wait for 00:00.

      DaveP wrote:
      how to capture midnite
      i want to create log files based on change of day
      i was thinking seconds past midnite...
      >
      tks DaveP
      >
      >
      >

      Comment

      • DaveP

        #4
        Re: datetime

        thanks much
        DaveP

        "Martin CLAVREUIL" <m.c@w.fwrote in message
        news:em15xFU$HH A.4880@TK2MSFTN GP03.phx.gbl...
        Hi Dave,
        >
        The simplest way is to do with a timer control ticking each minute and to
        wait for 00:00.
        >
        DaveP wrote:
        >how to capture midnite
        >i want to create log files based on change of day
        >i was thinking seconds past midnite...
        >>
        >tks DaveP
        >>
        >>

        Comment

        • Cor Ligthert[MVP]

          #5
          Re: datetime

          Martin,

          I tell it always in another way: I will forever calculate the time that to
          go to the 00:00 and set that as the timer time to go minus let say 10%
          (because the computer can be busy at the time of the event).

          Cor

          "Martin CLAVREUIL" <m.c@w.fschre ef in bericht
          news:em15xFU$HH A.4880@TK2MSFTN GP03.phx.gbl...
          Hi Dave,
          >
          The simplest way is to do with a timer control ticking each minute and to
          wait for 00:00.
          >
          DaveP wrote:
          >how to capture midnite
          >i want to create log files based on change of day
          >i was thinking seconds past midnite...
          >>
          >tks DaveP
          >>
          >>

          Comment

          Working...