Link to home
Start Free TrialLog in
Avatar of directxBOB
directxBOBFlag for Ireland

asked on

Timestamp

Just trying to get a timestamp:

new DateTime().ToString()

is that correct?
Avatar of Ashish Patel
Ashish Patel
Flag of India image

string strDate  = DateTime().Now.ToString();

and for both date and time as different do this

string strDate = DateTime.Now.ToShortDateString();
string strTime = DateTime.Now.ToShortTimeString();
Avatar of directxBOB

ASKER

DateTime().Now

Doesn't appear to exist, what version of ,NET would that be in? I can only use 2.0
ASKER CERTIFIED SOLUTION
Avatar of Ashish Patel
Ashish Patel
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial