|
I have string = "5/8/2007 2:42:32.316425" got it from database
I want to convert it to .NET date object with all fraction second in it.
If any one knows Please let me know.
Thanks
Mohamed
|
|
|
|
|
DateTime dta;
dta = Convert.ToDateTime(DateTime.Now.ToString("MM/dd/yyyy");
|
|
|
|
|
DateTime dta;
dta = Convert.ToDateTime(DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.ffffff"));
String ms = dta.Millisecond.ToString();
|
|
|
|
|
DateTime dta;
dta = Convert.ToDateTime(DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss.ffffff"));
String hhh = dta.ToString("MM/dd/yyyy HH:mm:ss.ffffff");
String ms = dta.Millisecond.ToString();
|
|
|
|
|
Hasan Ali wrote: with all fraction second in it
Elaborate a bit more, please...
Do you mean something like 5/8/2007 2:42:32 1/3"?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
You really should store datas as dates in your database, not as strings.
DateTime.TryParse is your best bet.
BTW, it took me a day to help you because at first glance your (mostly meaningless) replies made me think someone had helped you.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hello friends
i use ajax in my website...
i want to update my gridview or datagrid or every components that behavior like these with ajax method but i dont know how i can do it?
please help me.
thank you.
www.toolsfa.com==>msma
|
|
|
|
|
A grid view is a server side construct. On the client side, it's just a table. So, you can add to your table using AJAX, I assume the AJAX call gets or stores the data ? What do you know about how to use AJAX ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi my friends
i used a method to increase the online users of my website and it work correctly.
but i need to decrease the online users when a user close my website, but i can't do it.
please help me if anybody know...
thank you.
www.toolsfa.com==>msma
|
|
|
|
|
How are you doing this? Your question really doesn't make a whole lot of sense.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
dear paul
i use start_application or start_session method in global file for increasing the online users
but when i use end_application or end_session method for decreasing the online users it does not work. do you know where i made a mistake
thank you
www.toolsfa.com==>msma
|
|
|
|
|
Support for Session End is not very good and i've seen this question asked many times.
One you may try, is setup a timer, if the timer expires without any user activity, then decrease your counter.
|
|
|
|
|
Do you have your users log on and log off? I'd like to get a feel of what your website is doing, so I can try to help you.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
try this maybe can help u
Regards,
Tomi
|
|
|
|
|
Hi.
For viewing error message in asp (ASP 3.0 Not ASP.Net) pages instead of a general message (500-Internal Server Error),
in IE7 In windows vista I isables "Show Friendly HTTP error messages" but now I see "An error occurred on the server when processing the URL. Please contact the system administrator"
But I'm Admin
Best wishes
|
|
|
|
|
You should be able to customize error pages. I think you need to do something like a file, for example. called 500.html and point the webserver to that file when it throws an error 500.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I need to setup a custom 404 error on a new web host for a client. The host supports ASP .NET 1.1. The host don't want to configure IIS for 404 errors and wants me to use web.config to handle the errors.
I created a web.config file in a text editor and placed it into the root directory.
I then created another file named test.htm and also placed into the root directory of the website.
-------- web.config --------
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<customErrors defaultRedirect="/test.htm" mode="On">
<error statusCode="404" redirect="/test.htm" />
</customErrors>
</system.web>
</configuration>
----------------------------
--------- test.htm ---------
<HTML>
<HEAD><TITLE>Static</TITLE></HEAD>
<BODY>This is a static page</BODY>
</HTML>
----------------------------
If I enter: http://hostname/web.config
The test.htm file is served back by the web server.
If I enter: http://hostname/missing.htm
I get the standard 404 message, not my test.htm
These are the only two files that I added to site after the host created the web.
Any guidance as to what to try next? I did try changing the redirect from "/test.htm" to "test.htm", but the effect was the same.
Thank You
|
|
|
|
|
Contact the webhost, they should have a tech support department that can help you out. If they are incompetent, then that maybe bad...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Paul, Thank you for the suggestion.
In the meantime, while I wait to hear back from the hosting company, does anyone have any suggestions as to why this doesn't work?
|
|
|
|
|
leapforward wrote: while I wait to hear back from the hosting company
How long is the wait?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
It's the client's hosting company that purchases through a reseller agreement with the real hosting company. So communication is a challenge.
I did discover that the 404 works for any request that cannot be found that has a .aspx extension. But, I need to be able to handle many extensions including: (.htm, .html, .asp, .pdf, .doc). I also need to be able to handle the situation when there is no extension, such as: /corporate/clients
My guess is that they are going to configure IIS to use the page that I originally requested. unless anyone has ideas on how to easily make this work for all paths with or without file extensions.
Thanks Again...
|
|
|
|
|
leapforward wrote: the client's hosting company
Who is the hosting company? They should have some FAQ on their site.
leapforward wrote: they are going to configure IIS to use the page that I originally requested
They'll have to. On my machine I just go to Administrative Tools/IIS and go to Website Properties and it's there for changing to the file...
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi all
I have some events which i have written in application_start event of web service.Now when i stop the webservice and again restart the application event is not firing..But when i change any dlls associated with it and restart the services, then application_start event fires
Can any one points me why the application_start event is not firing..Is there any time out period so that its not firing..I am new webservices
Advanced thanks
Regards
DilipRam
|
|
|
|
|
Are you stopping the web service or just the debugging of it? Because I suspect the latter. Changing dlls toggles recompilation, so then the service is really stopped and restarted.
|
|
|
|
|
Hi
Thanks for the reply.I am just restarting the IIS but also my application event is not firing...but if change the dll the restart the iis then application start event is fired..Hope i am clear now
Thanks in advance
Regards
DilipRam
|
|
|
|