[Solved] Enter Date & Time With CONCATENATE

Discuss the spreadsheet application
Post Reply
CapCrockett
Posts: 47
Joined: Fri Jan 29, 2016 6:54 pm

[Solved] Enter Date & Time With CONCATENATE

Post by CapCrockett »

I know how to enter a static date & time into one cell using Ctrl+ combinations, but is it possible to enter a static date & time using CONCATENATE?

If so, how?
Last edited by CapCrockett on Thu Jun 24, 2021 8:52 pm, edited 1 time in total.
OpenOffice 4.1.12 on Windows 10 Home
FJCC
Moderator
Posts: 9277
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Enter Date & Time With CONCATENATE

Post by FJCC »

This

Code: Select all

=CONCATENATE("2021-06-24"; " ";"12:32:14")
returns a string that is interpreted as a date and time.
What are you trying to accomplish beyond your immediate questions?
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
CapCrockett
Posts: 47
Joined: Fri Jan 29, 2016 6:54 pm

Re: Enter Date & Time With CONCATENATE

Post by CapCrockett »

Thank you.
FJCC wrote:What are you trying to accomplish beyond your immediate questions?
The time remaining to an option's expiration.
OpenOffice 4.1.12 on Windows 10 Home
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Enter Date & Time With CONCATENATE

Post by Villeroy »

A concatenation returns text. Text is useless.
=A1-NOW() returns the time remaning between the date/time in A1 and now.

Having a date (day number) in A1 and a time (fraction of a day) in B1, A1+B1-NOW() returns the time remaining.

[Tutorial] Ten concepts that every Calc user should know (applies similarly to all spreadsheet applications)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
CapCrockett
Posts: 47
Joined: Fri Jan 29, 2016 6:54 pm

Re: Enter Date & Time With CONCATENATE

Post by CapCrockett »

Villeroy wrote:Having a date (day number) in A1 and a time (fraction of a day) in B1, A1+B1-NOW() returns the time remaining."
Thank you. That should accomplish my requirement. I had not yet tried the other solution.
OpenOffice 4.1.12 on Windows 10 Home
Post Reply