Do the minutes increment up after 59 to 60 (60 being 1:00 AM) and so on?
If that's the case I believe this UDF will do it:
Code:
Function UnixTime(r As String) As Long
Dim d, dv
r = Replace(r, " ", "/")
d = Split(r, "/")
dv = DateValue(d(1) & " " & d(0) & " " & d(2)) + TimeSerial(0, d(3), 0)
UnixTime = (dv - DateSerial(1970, 1, 1)) * 86400
End Function
Excel 2010
| A | B |
---|
20/4/2017 30 | | |
20/4/2017 32 | | |
20/4/2017 39 | | |
20/4/2017 40 | | |
20/4/2017 44 | | |
20/4/2017 51 | | |
20/4/2017 59 | | |
<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"]1492648200[/TD]
[TD="align: center"]2[/TD]
[TD="align: right"]1492648320[/TD]
[TD="align: center"]3[/TD]
[TD="align: right"]1492648740[/TD]
[TD="align: center"]4[/TD]
[TD="align: right"]1492648800[/TD]
[TD="align: center"]5[/TD]
[TD="align: right"]1492649040[/TD]
[TD="align: center"]6[/TD]
[TD="align: right"]1492649460[/TD]
[TD="align: center"]7[/TD]
[TD="align: right"]1492649940[/TD]
</tbody>
Sheet1
[TABLE="width: 85%"]
<tbody>[TR]
[TD]
Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]=unixtime(
A1)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B2[/TH]
[TD="align: left"]=unixtime(
A2)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B3[/TH]
[TD="align: left"]=unixtime(
A3)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B4[/TH]
[TD="align: left"]=unixtime(
A4)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B5[/TH]
[TD="align: left"]=unixtime(
A5)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B6[/TH]
[TD="align: left"]=unixtime(
A6)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B7[/TH]
[TD="align: left"]=unixtime(
A7)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]