Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Current date and time?

Status
Not open for further replies.

staffy

Programmer
Feb 21, 2001
1
US
I have been programming on Oracle Databases for a while, so adjusting to MS is my current dilemma.

How do I pull the current date and time from the server via select statement? I know in oracle, it is "select to_char(sysdate,'mm/dd/yyyy hh:mm:ss am') date from dual", but this is an oracle thing. Is there anything similar in MS?
 
select getdate()
if you want it in a specified format use
datepart

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top