Skip to content
Reference > Methods

parseDateNano(text,format,timezone)

Definition

UTCN parseDateNano(String text, String format, String timezone)

Description

Converts a string to a unix epoch time. Returns a UTCN object that represents the given time.

Parameter Definition

Name Type Description
text String String to parse
format String Pattern to expect string to be in, see java SimpleDateFormat for options
timezone String Timezone to expect string is in

Examples

UTCN r1 = parseDateNano("201505030-10:30:40.123","yyyyMMdd-HH:mm:ss.SSS","EST5EDT"); // r1 == 1432996240123000000
UTCN r2 = parseDateNano("Jan/03/1982-10:30:40","MMMM/dd/yyyy-HH:mm:ss","UTC"); // r2 == 378901840000000000