开发者

how create date type of vbs in perl?

I have a dcom function need to be fed with date type. I'd like to call it in my perl script, but I have no idea to create date typ开发者_开发技巧e in perl.

In short, my question is how translate below vbs statement into perlish one

date_from = DateSerial( 2011, 01, 01) + TimeSerial(6, 0, 0)

Thanks in advance!


There is a wrapper lib for windows. Win32::OLE

example http://www.perlmonks.org/?node_id=516137


You can use strftime method in POSIX module.

use POSIX;

$data_from = POSIX::strftime("%m/%d/%Y %I:%M:%S %p", $sec, $min, $hour, $mday, $mon, $year-1900);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜