How do I get the current time on os x?

Mac OSX specific forum
ozak
New User
New User
Posts: 4
Joined: Wed Jun 21, 2006 11:03 am

How do I get the current time on os x?

Post by ozak »

Hi all

I can't seem to find the function for getting the current time (I need it for a log system) on Purebasic OS X

Thanks in advance
WilliamL
Addict
Addict
Posts: 1252
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: How do I get the current time on os x?

Post by WilliamL »

Look in 'Help' for "Date()"

(from Help file)

Code: Select all

Date$ = FormatDate("%yyyy/%mm/%dd", Date())
Time$ = FormatDate("%hh:%ii:%ss", Date())

MessageRequester("PureBasic - Date Example", "Date: "+Date$+Chr(10)+"Time: "+Time$, 0)
MacBook Pro-M1 (2021), Sequoia 15.4, PB 6.20
Post Reply