setting DateTime value to registry

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • prabunewindia
    New Member
    • Mar 2007
    • 199

    #1

    setting DateTime value to registry

    hi friend,
    i want to set current dateTime to the registry.
    any one help me to do that.
    its taking only string value.
    when i tried with DateTime.Now.To String()
    its display only the string(thats " DateTime.Now.To String()")
    plz guide
    Prabu
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Don't put it in quotes,
    DateTime.Now.To String() returns a string and is to be used thusly.
    Code:
    string mydatestring=DateTime.Now.ToString();

    Comment

    • prabunewindia
      New Member
      • Mar 2007
      • 199

      #3
      hi friend,
      thanks for reply.
      i am not writing in code.
      thats in Web set up project
      i created a registry and in the value property of date(my registry)
      i gave that line(its not correct). it set that code string(DateTime .Now.ToString() ) as value. i want to insert system date time while instatlling the application
      plz help
      Prabu

      Originally posted by Plater
      Don't put it in quotes,
      DateTime.Now.To String() returns a string and is to be used thusly.
      Code:
      string mydatestring=DateTime.Now.ToString();

      Comment

      Working...