hostname of machine

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • questionit
    Contributor
    • Feb 2007
    • 553

    hostname of machine

    how to get hostname of the machine and the current time/date

    can anyone help in writing code?

    Thanks
  • kjnhu
    New Member
    • Jul 2007
    • 7

    #2
    time stuff is located in:
    datetime.today
    then do .year or w/e time argument you are looking for

    Comment

    • Mague
      New Member
      • May 2007
      • 137

      #3
      Get host name :
      System.Windows. Forms.SystemInf ormation.Comput erName

      Get time/date depends if you want it a string or integer or what ever

      read this or go to this site
      http://msconline.macon state.edu/tutorials/VBNET/VBNET01/vbnet01-07.aspx


      Property Value
      DateString Returns a String value representing the current date.
      DateString = 07-14-2007
      Now Returns a Date value containing the current date and time.
      Now = 7/14/2007 6:04:38 PM
      TimeOfDay Returns a Date value containing the current time of day (the date is set to 1/1/0001).
      TimeOfDay = 1/1/0001 6:04:38 PM
      Timer Returns a Double value representing the number of seconds elapsed since midnight.
      Timer = 65078.7415218
      TimeString Returns a String value representing the current time of day.
      TimeString = 18:04:38
      Today Returns or sets a Date value containing the current date.
      Today = 7/14/2007 12:00:00 AM

      Hope this helps
      Mague

      Comment

      • questionit
        Contributor
        • Feb 2007
        • 553

        #4
        Hi , I need code for VB6 not for VB.NET


        Originally posted by Mague
        Get host name :
        System.Windows. Forms.SystemInf ormation.Comput erName

        Get time/date depends if you want it a string or integer or what ever

        read this or go to this site
        http://msconline.macon state.edu/tutorials/VBNET/VBNET01/vbnet01-07.aspx


        Property Value
        DateString Returns a String value representing the current date.
        DateString = 07-14-2007
        Now Returns a Date value containing the current date and time.
        Now = 7/14/2007 6:04:38 PM
        TimeOfDay Returns a Date value containing the current time of day (the date is set to 1/1/0001).
        TimeOfDay = 1/1/0001 6:04:38 PM
        Timer Returns a Double value representing the number of seconds elapsed since midnight.
        Timer = 65078.7415218
        TimeString Returns a String value representing the current time of day.
        TimeString = 18:04:38
        Today Returns or sets a Date value containing the current date.
        Today = 7/14/2007 12:00:00 AM

        Hope this helps
        Mague

        Comment

        Working...