Link to home
Start Free TrialLog in
Avatar of dsteers
dsteers

asked on

Getting Computers Date & Time

Hi,
I was wondering if anyone could help me.
      I want to know how to get the current computer time and date,
in both 24 hr format or showing "AM/PM"


Thanks
Dave Steers
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Use the Format function.

? format(time,"hh:nn:ss AMPM")
09:50:33 PM
? format(time,"hh:nn:ss")
21:50:47
ASKER CERTIFIED SOLUTION
Avatar of soosairaj
soosairaj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KDivad
KDivad

Date, Time and Now are probably what you want, but also take a look at the following functions: Year, Month, Day, Hour, Minute and Second.
Avatar of dsteers

ASKER

Thank you everyone,soosairaj,emoreau &
KDavid.
Avatar of dsteers

ASKER

Also does anyone know a bit of code that would allow the subtraction of time over midnight.
E.g From 1300 (PM) Thursday 9 March to
 0200 (AM) Friday 10 March.

The Code will tell the difference between the two in days,hours & minutes.

Thanks
Dave Steers
Avatar of dsteers

ASKER

DAMM !!
I meant to Give the points to emoreau,
(sorry soosairaj).
My mistake.

emoreau I will post you the points in another question labled
"Points for emoreau"
sorry for this inconvienience.
Thanks
>>Also does anyone know a bit of code that would allow the subtraction of time over midnight.<<
Take a look at the DateDiff function.