Re: regex substitution question
Mathew Snyder wrote:
A script I've been working on will provide time spent on a work ticket in H:MM
format. However, if the MM section is less than 10 it only shows as H:M so I
need to append a 0 to it. So, for instance, if the output looks like this 9:7 I
need to append the 0 to the 7 making it 9:07.
The output is created by joining to array elements like so:
my $endtime = $endtime[0] . ":" . $endtime[1];
my $endtime = sprintf '%d:%02d', @endtime[ 0, 1 ];
John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
.
Relevant Pages
- RE: SaveWorkbookAsToday()
... Create a string variables for the day and convert your date to the format you ... Then append or concatenate the string date where necessary in the file name. ... Dim DateFormat As String ... (microsoft.public.excel.programming) - Re: Write position
... Formatted direct-access file: nearly as complicated as except that the record-length is not generally o/s-dependent, and you can use a formatted write, but you need to get the format correct to fill the record (including the newline sequence). ... As for direct-access you need to convert the numbers to text yourself with an internal file write, and append the newline sequences yourself, but a minor advantage is that you don't have to worry about record lengths at all. ... (comp.lang.fortran) - Re: Copy and paste from Excel to access.
... where the format of the excel sheet matches the format of the datagrid? ... I might want to update or I may want to append. ... you can import a range of cells using the TransferSpreadsheet ... (microsoft.public.access.gettingstarted) - Re: Zip Code import from Excel
... A text field will not prevent you from putting letters ... > If you put this in as the format, you do not need to type the hyphen. ... >> to the spreadsheet (rather than importing it), ... >> query to append the data into the pre-built Access table. ... (microsoft.public.access.tablesdbdesign) - Re: Create Properties for Decimal and Date fields
... I would like to assign a format of "short date" to the date field ... Dim dbs As DAO.Database ... 'Append the fields to the TableDef's Fields collection ... (microsoft.public.access.modulesdaovba) |
|