source:http://www.dbforums.com/perl-dbi/1609392-generating-dates-perl-cocatenating-database-field.html
use strict ;
use POSIX qw(strftime);
use Time::Local 'timelocal_nocheck';
# here are your two passed in arguments
my $startDate = '2010-09-23';
my $daysToAdd = '360';
$startDate =~ /(\d+)-(\d+)-(\d+)/;
my ($mday,$mon,$year) = ($3,$2,$1);
# convert to epoch time
my $date = timelocal_nocheck(0,0,0,
$mday-1,
$mon-1,
$year
);
# make the new filenames
for (1..$daysToAdd) {
my $NewDate = strftime('%Y%m%d',0,0,0,
(localtime($date+=86400))[3,4,5]
);
my $RunTimeStart = "$NewDate" . "000000" ;
my $RunTimeStop = "$NewDate" . "235959" ;
print "$RunTimeStart---$RunTimeStop\n" ;
} #eof for
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
1 month ago
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!