Hi folks,
I need a simple routine to convert unix date-time to a date and time notation.
Unix date-time is the number of seconds since 1-1-1970.
so this amount of seconds must be changed in a date like 28-03-2024 and 12hours and 25 seconds ( as an example)
i can calculate date to unix time, but the other way around not.
so the date 15 march 2014 0 hours and 0 minutes gives 1394928000 seconds.
so please who can help me.
please no stuctures and other fancy tricks....just a few pure basic lines.. an input and an output.
by the way,, i do use purebasic now for a lot of years and am very happy with it!
Wim Apon
i need a simple routine to convert unix-time to date-time
Re: i need a simple routine to convert unix-time to date-time
Code: Select all
UnixTime = 1394928000
Debug FormatDate("%dd.%mm.%yyyy %hh:%ii", UnixTime)
BTW: It's the 16 march 2014 0 hours and 0 minutes
Hygge
-
- Enthusiast
- Posts: 290
- Joined: Thu Dec 16, 2010 2:05 pm
- Location: Delfzijl ( The Netherlands )
- Contact:
Re: i need a simple routine to convert unix-time to date-time
ho Kiffy
so that is a very quick response,
i go try it.
thank you very much
Wim
so that is a very quick response,
i go try it.
thank you very much
Wim
-
- Enthusiast
- Posts: 290
- Joined: Thu Dec 16, 2010 2:05 pm
- Location: Delfzijl ( The Netherlands )
- Contact:
Re: i need a simple routine to convert unix-time to date-time
Hi Kiffy,
again...it works like a charm.
i also found now the date command for the other way around.
It is much faster than my old program... that program used 36 lines of code.....
again, thank you very much
Wim
again...it works like a charm.
i also found now the date command for the other way around.
It is much faster than my old program... that program used 36 lines of code.....
again, thank you very much
Wim