473,569 Members | 2,761 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setting DateTime value to registry

prabunewindia
199 New Member
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
Jun 22 '07 #1
2 1429
Plater
7,872 Recognized Expert Expert
Don't put it in quotes,
DateTime.Now.To String() returns a string and is to be used thusly.
Expand|Select|Wrap|Line Numbers
  1. string mydatestring=DateTime.Now.ToString();
  2.  
Jun 22 '07 #2
prabunewindia
199 New Member
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

Don't put it in quotes,
DateTime.Now.To String() returns a string and is to be used thusly.
Expand|Select|Wrap|Line Numbers
  1. string mydatestring=DateTime.Now.ToString();
  2.  
Jun 23 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3506
by: D. Yates | last post by:
Hi, How exactly do you use the condition property to tell the installer not to overwrite changed registry values? Initially, I want certain registry values within a given key set to the value contained within the registry view (right click the install project and navigate to View->Registry). However, if the user runs the setup.exe...
6
8971
by: Ante Perkovic | last post by:
Hi, How to declare datetime object and set it to my birthday, first or last day of this month or any other date. I can't find any examples in VS.NET help! BTW, what is the difference between date and datetime classes? Please, help
12
1802
by: Quemasda | last post by:
Hi, The application I'm working on should set the Special Folders (Favorites, My Documents, ...) but I can't find the way to do it. So far, I've been able to get the path of those Special Folders but not set them. Does anybody know how? Thanks in advance, Que_Mas_Da.
4
6232
by: Maziar Aflatoun | last post by:
Hi, Can someone please tell me how I can set DateTime to 01/01/1970 (UTC). Doing the following DateTime dt1 = new DateTime(1970, 1,1); Debug.WriteLine("dt1(utc):"+ dt1.ToUniversalTime().ToString()); Doing the following returns 1/1/1970 5:00:00 AM
3
10900
by: Rich Robinson | last post by:
Hi, I have a web service method which takes a DateTime type as a parameter. The service is UK based, and the dates are passed in to the service in the UK format dd/MM/yyyy. On a recent install, the web service method will not accept the UK date format, erroring with a System.Argument exception, but would take US formatted dates.
1
6462
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located...
0
1561
by: Dan Holmes | last post by:
I recently updated to SP1 of vs2005 and i didn't have this error before. I changed a registry entry that had to do with development. I found it on msdn and now i can't find it anymore. I suspect it may be the problem. The entry had to do with directory paths or something so that debugging in VS could be done on code not in the bin dir of...
2
2778
by: sony.m.2007 | last post by:
Hi, When i try to set a value for a session variable I'm getting a object refence not set error I tried two methods as below HttpContext.Current.Session.Add("AppStartTime", DateTime.Now); HttpContext.Current.Session = DateTime.Now; For the above two methods I'm getting error as "Object reference not set to an instance of an object."
1
9996
by: =?Utf-8?B?UmljaA==?= | last post by:
In the Registry at HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Jet \ 4.0 \ Engines \ Text the default key for Text Format is: "Format" = "CSVDelimited" I can use the following OleDB connection string with an OleDB dataAdapter to read a comma delimited text file when "Format" = "CSVDelimited"
0
7697
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.