Date: prev next · Thread: first prev next last
2023 Archives by date, by thread · List index


James,

Format thew column as time
Select the column and query/replace a.m. with AM
Select the column and query/replace p.m. with PM

Thats all.

Success,
Rob

Op 28 jun. 2023, om 23:31 heeft James <bjlockie@lockie.ca> het volgende geschreven:

That seems to leave 11 pm as 11:00 (I expect 23:00).
Maybe I am doing it wrong.

On 2023-06-28 17:10, Alan B wrote:
Select the text fields, hopefully they are in a column or columns.

After selecting the fields select "Data > Text to Columns..." from the menu

In the Text to Columns dialog box select the following options:
For "Separator Options" tick "Separated by".
The only separator option that should be ticked is "Space".
Be certain "Detect special numbers" is ticked in the "Other Options"
choices.
Click the "OK" button.

The time portion of the column will now be a time formatted number in the
column it was already in. Depending on the default format it may or may not
have AM/PM. If it doesn't, just change the time format to what you need at
this point.

The "a.m." or "p.m." portion of your original text will be moved one column
over. It will overwrite what is in the next column if the column is not
empty.

To prevent adjacent columns from being overwritten, while still in the
"Text to Columns" dialog box, go to the "Fields" section at the bottom.

There should be two columns with a heading of "Standard", one column
showing the time portion of your text, the other column showing the a.m/p.m
portion. Click the word "Standard" over the a.m/p.m column.

Now open the "Column type" list and pick the "Hide" option.

Finally, click OK to close the dialog box.

You text time will now be a time number in the column it was already in.
The a.m/p.m portion has not overwritten the adjacent column as it has been
discarded as part of the Text to Columns operation.


On Wed, Jun 28, 2023 at 4:32 PM James <bjlockie@lockie.ca> wrote:

I have text fields like:

10:06:59 a.m.
8:57:36 p.m.

How do I convert them to 24-hour time fields?
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems?
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy




-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.