Convert string time into seconds?

Wayne Krone wk at hpirs.HP.COM
Sat Jul 8 07:27:09 AEST 1989


> I have a user entered time/date in the format:
> yymmddhhmmss
> I need to convert this into seconds since the epoch and

If you have ANSI C libraries, convert the yymmddhhmmss into a tm struct
and then use mktime() to convert that into seconds since the epoch.

Wayne



More information about the Comp.unix.wizards mailing list