0

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 type 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!

xiaoyafeng
  • 41
  • 4

2 Answers2

0

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

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

jami
  • 190
  • 2
  • 14
0

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);
Yi Zhao
  • 6,768
  • 1
  • 18
  • 18