Autohotkey发送格式化的日期时间

时间:2015-08-11 21:17:50

标签: autohotkey

我正在尝试发送在此GUI中选择的日期时间,但我需要以特定方式格式化它。为了测试我将输出发送到记事本“无标题”

Gui, Add, Text,, Summary
Gui, Add, Edit, vEdit
Gui, Add, Text,, Date of Change
Gui, Add, DateTime, vdatetime,
Gui, Add, Button,, OK
Gui, Show, x403 y262 h310 w392, New GUI Window
Return


ButtonOK:
Gui, Submit, NoHide

WinActivate Untitled

Send %Edit%{Enter}
Send, %datetime%,{Enter}

ExitApp

GuiClose:
ExitApp

Escape::
ExitApp
Return

目前的输出是:

test Summary
20150811161206,

我需要它采用这种格式:

test Summary
8/11/2015 12:00:00 AM

怎么做?

1 个答案:

答案 0 :(得分:1)

您要找的是FormatTime

for component in row['geocode_data']['geometry']:
        if 'location' in component ['lat']:
            df['location_lng'][i] = component['lng']