Re: about timestamp reformat
From: Gunnar Hjalmarsson (noreply_at_gunnar.cc)
Date: 03/26/04
- Next message: Matt Garrish: "Re: Perl Application, Server error"
- Previous message: janet: "Re: about timestamp reformat"
- In reply to: janet: "Re: about timestamp reformat"
- Next in thread: Hon Seng Phuah: "Re: about timestamp reformat"
- Reply: Hon Seng Phuah: "Re: about timestamp reformat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 26 Mar 2004 20:38:53 GMT
janet wrote:
> Gunnar Hjalmarsson wrote:
>> Gunnar Hjalmarsson wrote:
>>>
>>> { '|' . (sprintf '%d-%02d-%02d-%02d%s%06d', $3, $months{$1},
>>> $2, $7 eq 'PM' ? 12+$4 : $4, $5, $6) . '|' }egx;
>>
>> Those lines are probably better replaced with:
>>
>> { '|' . (sprintf '%d-%02d-%02d-%02d%s%03d', $3, $months{$1},
>> $2, $7 eq 'PM' ? 12+$4 : $4, $5, $6) . '000|' }egx;
>
> I met a new problem when convert the data
>
> For exp:
>
> 12:35:40, if converted, it would change to 24:45:40. that is not
> correct. I'm not very familiar with Perl,
I know, you told us so in your original post. (I'm not very familiar
with the AM/PM time format.)
Since you asked for help here, I thought you were about to learn Perl,
so I hoped you would figure out how the the code I posted works, and
learn something new by doing so. Now I understand that that was never
your intention. Apparently you just wanted somebody to do your job for
you.
> who could help me how to do it?
I won't.
> Gunnar, do you have time to take a look ?
I'm not in the mood.
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
- Next message: Matt Garrish: "Re: Perl Application, Server error"
- Previous message: janet: "Re: about timestamp reformat"
- In reply to: janet: "Re: about timestamp reformat"
- Next in thread: Hon Seng Phuah: "Re: about timestamp reformat"
- Reply: Hon Seng Phuah: "Re: about timestamp reformat"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|