regex substitution question



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];

I've tried and failed with whatever combination I use. Can someone help me out?


Mathew
.



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: 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: Make a cell value include number formats
    ... If you're writing code to append to a file, ... (only if that cell were formatted correctly.) ... > doesn't include my number format. ... > Cell Value Display in Excel ...
    (microsoft.public.excel.programming)
  • 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)