[erlang-questions] Timestamp in HH:MM:SS.mmm

Motiejus Jakštys desired.mta@REDACTED
Mon Jun 4 09:47:58 CEST 2012


On Mon, Jun 4, 2012 at 9:37 AM, Avinash Dhumane <avinash@REDACTED> wrote:
> In order to bind a value of SQL-type TIMESTAMP that has granularity till
> milliseconds to an attribute of an object, which library call is suitable? I
> checked erlang:localtime/0 and erlang:now/0; former's granularity is till
> seconds and I am not sure about later's.

       now() -> timestamp()

              Types:

                 timestamp() = {MegaSecs, Secs, MicroSecs}
                 MegaSecs = Secs = MicroSecs = integer() >= 0

Micro seconds for erlang:now().

-- 
Motiejus Jakštys



More information about the erlang-questions mailing list