Question about dates/times

  • Thread starter Thread starter Brendan
  • Start date Start date
B

Brendan

Is there an efficient way to format columns for the date, time, and day of
week, and then reference that data in statements, for example using an if
statement assume a certian value for each month/day of week/time of day?
 
That is a very ambiguous question.

Firstly, it is simple to format a column, just select the column, and use
Format>Cells>Date and Time and choose a format.

But what does '... an if statement assume a certain value for each month/day
of week/time of day...' mean?

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
First - the way a cell is formatted doesn't affect the underlying value,
which is what other cells will use in calculations. So how the IF()
statement interprets the value doesn't depend at all on how the cell is
formatted.

One way:

A1: <date>

Format as "dddd dd mmm yyyy hh:mm:ss"

What "certain value" do you want to assume?

You can use

=MONTH(A1)
=WEEKDAY(A1)

or for time,

=MOD(A1,1)
 
Back
Top