Calculates Unix date/time number of a given date/time.
Needed it to pass date/time parameter to Yahoo! finance URL query to read certain company finance for certain timeframe.
Here is the pure Excel function way to do the same.
Function UnixDateTimeNumber(FromDate)
' Unix timestamp, used at least in Yahoo! Finance
' ? datediff("s",dateserial(1970,1,1), dateserial(2021,9,30))
Rett = FromDate
Rett = datediff("s", dateserial(1970,1,1), cdate(FromDate))
UnixDateTimeNumber = Rett
End Function
' Unix timestamp, used at least in Yahoo! Finance
' ? datediff("s",dateserial(1970,1,1), dateserial(2021,9,30))
Rett = FromDate
Rett = datediff("s", dateserial(1970,1,1), cdate(FromDate))
UnixDateTimeNumber = Rett
End Function
FromDate
Views 98
Downloads 55
CodeID
DB ID