in reply to Re: Newbie: Request help on creating CSV using timestamp data
in thread Newbie: Request help on creating CSV using timestamp data
Now, i need a logic where i can keep incrementing the start and end timestamps by 15 or 30 or 60 mins. Thus, having unique timestamps. But the criteria is that i need to have only 50 unique values for a week. Later, continue the same 50 timestamps for the next week and so on..sub starttimestamp() { my $st = localtime; return sprintf( "%04d-%02d-%02dT%02d:%02d:%02d.000-0700", $st->year + 1900, $st->mon + 1, $st->mday, $st->hour, $st->min, $st->sec ); } sub endtimestamp() { my $et = localtime; return sprintf( "%04d-%02d-%02dT%02d:%02d:%02d.000-0700", $et->year + 1900, $et->mon + 1, $et->mday, $et->hour, $et->min + 15, $et->sec ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Newbie: Request help on creating CSV using timestamp data
by Tux (Canon) on Nov 22, 2013 at 14:43 UTC | |
by Anonymous Monk on Nov 25, 2013 at 10:34 UTC | |
by Tux (Canon) on Nov 25, 2013 at 11:57 UTC | |
|
Re^3: Newbie: Request help on creating CSV using timestamp data
by hippo (Archbishop) on Nov 22, 2013 at 13:44 UTC |