Time Now() minus ten minutes
Hi Scott,
Am Mon, 14 Jan 2013 06:00:11 -0800 (PST) schrieb Sabosis:
I am trying to get the current time less ten minutes to calculate in a cell. I need the time only, no date so I was told to use the MOD portion in the formula below.
ActiveCell.FormulaR1C1 = "=MOD(NOW()- Timeserial(0,10,0)"
If it is 5:37 AM, I want 5:27 AM reported with now date in the field.
format the cell "h:mm AM/PM"
or do it in VBA:
With ActiveCell
.Formula = "=NOW()-TIME(0,10,0)"
.NumberFormat = "h:mm AM/PM"
End With
Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
|