- ©«¤l
- 37
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 63
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-25
- ³Ì«áµn¿ý
- 2016-5-24
|
- Sub get_time()
- Set XmlHttp = CreateObject("Microsoft.XMLHTTP")
- XmlHttp.Open "Get", "http://tw.yahoo.com/", False
- XmlHttp.send
- datetxt = XmlHttp.getResponseHeader("Date")
- Set XmlHttp = Nothing
- temdate = Split(datetxt, ",")
- tempvar = Replace(temdate(1), "GMT", "")
- temptim = Split(tempvar, " ")
- Select Case temptim(2)
- Case "Jan":
- mon = "01"
- Case "Feb":
- mon = "02"
- Case "Mar":
- mon = "03"
- Case "Apr":
- mon = "04"
- Case "Mar":
- mon = "05"
- Case "Jun":
- mon = "06"
- Case "Jul":
- mon = "07"
- Case "Aug":
- mon = "08"
- Case "Sep":
- mon = "09"
- Case "Oct":
- mon = "10"
- Case "Nov":
- mon = "11"
- Case "Dec":
- mon = "12"
- End Select
- '//±NÀò¨ú¨ìªº®É¶¡Âà´«¬°¥x¥_®É¶¡+8¤p®É
- timeGMT = temptim(3) & "¦~" & mon & "¤ë" & temptim(1) & "¤é " & temptim(4)
- 'timeGMT = CDate(temptim(3) & "¦~" & mon & "¤ë" & temptim(1) & "¤é" & temptim(4))
- GetNetTime = DateAdd("h", 8, timeGMT)
- Cells(1, 1) = GetNetTime
- Cells(2, 1) = Now()
- End Sub
½Æ»s¥N½X ¦^´_ 1# donod
Âà¦Ûgoogle search ---- Excel-VBA¾Ç²ß-ºô¸ô®É¶¡¨ú±o |
|