View Subcategory

Display the current date and time

Create a Date object representing the current date and time. Print it out.
If you can also do this without creating a Date object you can show that too.
python
from datetime import datetime
print datetime.utcnow()
clojure
(import 'java.util.Date)

(println (str (Date.)))
fsharp
printfn "%A" System.DateTime.Now
fantom
echo(DateTime.now)
csharp
// Creating a variable first:
DateTime now = DateTime.Now;
Console.WriteLine(now);

// Without creating a variable:
Console.WriteLine(DateTime.Now);