Created
June 3, 2018 02:10
-
-
Save muramoto1041/645590fa34d403f4efc0f7fc8012ff23 to your computer and use it in GitHub Desktop.
JavaScript Object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim cd As String | |
cd = "" | |
cd = cd & "function timeConv(s){" | |
cd = cd & " var dt = new Date(s);" | |
cd = cd & " var dtf = dt.getFullYear();" | |
cd = cd & " dtf += '/' + (dt.getMonth()+1);" | |
cd = cd & " dtf += '/' + dt.getDate();" | |
cd = cd & " dtf += ' ' + dt.getHours();" | |
cd = cd & " dtf += ':' + dt.getMinutes();" | |
cd = cd & " dtf += ':' + dt.getSeconds();" | |
cd = cd & " return(dtf);" | |
cd = cd & "}" | |
js.Addcode cd | |
MsgBox js.CodeObject.timeConv(Range("b3")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment