Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.20/5 (2 votes)
See more:
I have a datetime variable 'v_todaydt'. I want to assign current date and time into it. With my following code, I get the result like 27-07-2013 00.00.00.000. I want the sysetm's actual time and hours to get assigned. My code:

v_today_dt = DateTime.Today;
Posted
Comments
Sergey Alexandrovich Kryukov 26-Jul-13 23:47pm    
Oh gosh...
—SA

1 solution

Use
C#
v_today_dt = DateTime.Now;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900