Subject | Re: [firebird-support] How do I convert an AM/PM timestamp string? |
---|---|
Author | Scott Moon |
Post date | 2008-02-13T16:54:02Z |
Thanks James! I was hoping for a solution on the Firebird side, but using
your method got the job done. And I learned a new Excel trick to boot. I
would have probably figured out the formula, but I don't know if it would
have occurred to me to copy and paste the values over the formulae. At least
not until I tried to import the csv and got a bunch of "DATEVALUE(B2) +
TIMEVALUE(B2)" entries in the import error logs!
Scott
your method got the job done. And I learned a new Excel trick to boot. I
would have probably figured out the formula, but I don't know if it would
have occurred to me to copy and paste the values over the formulae. At least
not until I tried to import the csv and got a bunch of "DATEVALUE(B2) +
TIMEVALUE(B2)" entries in the import error logs!
Scott
On Feb 12, 2008 5:11 AM, James N Hitz <jamhitz@...> wrote:
> This may be OT but see below....
>
> Scott Moon wrote:
> > I have a varchar field that stores timestamp data imported from a text
> > file (CSV). I did not realize until it was too late that the timestamp
> > data was in AM/PM instead of 24 hour format. I have tried manipulating
> > the format in Excel to no effect. Does anyone know how to convert a
> > string timestamp from AM/PM to 24-hour format?
> >
> create an extra column, and assuming your date is on column A, enter...
>
> =DATEVALUE(A1) + TIMEVALUE(A1)
>
> ...and copy the formula down.
>
> Format the new column as Date (Format -> Cells, Number, Date) ensuring
> select the option with 24 hour timing.
>
> Select the data in the new column and PASTE SPECIAL its _values_ /over
> itself/:
> Select NEW data
> Edit >> Copy
> With NEW data still selected
> Edit >> Paste Special >> Values
>
> Delete the old column, Rename the new column and... Voila!!
> > Thanks,
> > Scott Moon
> >
> >
>
>
[Non-text portions of this message have been removed]