Re: Question on approach

2009-07-27 Thread Jay Savage
On Fri, Jul 24, 2009 at 4:54 AM, Shawn H. Corey wrote: [snip] > Unfortunately, the data is not directly sortable since the date is in > American format, not Système International (SI).  SI dates are directly > sortable and are the preferred format for storing dates. > > I would use a heap to sort

RE: Question on approach

2009-07-24 Thread Joseph L. Casale
>I have no idea what was wrong with me last night. You are absolutely >right, those are not in a sortable format. All the replies led me down the path of enlightenment:) The string before the "@" will always be the same, in fact, I must error check for this, so no need for a hash, I can just appl

Re: Question on approach

2009-07-24 Thread Chas. Owens
On Fri, Jul 24, 2009 at 04:54, Shawn H. Corey wrote: > Chas. Owens wrote: >> >> That date format is directly sortable, so unless you have another >> reason to convert to epoch time just use a string comparison in the >> sort.  I would probably write the code like this: > > Unfortunately, the data i

Re: Question on approach

2009-07-24 Thread John W. Krahn
Shawn H. Corey wrote: Chas. Owens wrote: That date format is directly sortable, so unless you have another reason to convert to epoch time just use a string comparison in the sort. I would probably write the code like this: Unfortunately, the data is not directly sortable since the date is in

Re: Question on approach

2009-07-24 Thread Shawn H. Corey
Chas. Owens wrote: That date format is directly sortable, so unless you have another reason to convert to epoch time just use a string comparison in the sort. I would probably write the code like this: Unfortunately, the data is not directly sortable since the date is in American format, not

Re: Question on approach

2009-07-23 Thread Chas. Owens
On Fri, Jul 24, 2009 at 00:18, Joseph L. Casale wrote: > Hi, > I have some data I will read into an array that is the format > "some_string"@"date" such as "foo/bar/b...@07-23-2009-11.42.02". > > To work with this, I will convert the date part (everything after > the "@" to the epoch format so it's

Question on approach

2009-07-23 Thread Joseph L. Casale
Hi, I have some data I will read into an array that is the format "some_string"@"date" such as "foo/bar/b...@07-23-2009-11.42.02". To work with this, I will convert the date part (everything after the "@" to the epoch format so it's easy to sort accurately. I figured I would create a hash with key