Erlang - localtime


Advertisements

The method is used to give the local date and time in the system.

Syntax

localtime()

Parameters

  • None

Return Value

The method is used to give the local date and time in the system.

For example

-module(helloworld). 
-export([start/0]). 

start() -> 
   io:fwrite("~p~n",[erlang:localtime()]).

Output

When we run the above program we will get the following result.

{{2016,4,17},{11,33,9}}
erlang_bifs.htm
Advertisements