'
Code:
'PBWIN 9.00 - WinApi 05/2008 - XP Pro SP3
'adapted from [URL]http://www.powerbasic.com/support/pbforums/showthread.php?t=35716&highlight=weekday[/URL]
'by Peter Lameijn 
 
#Compile Exe
#Dim All
#Include "Win32Api.inc"
'
Function Full_Date_Time As String
  Local ST As SYSTEMTIME, d, AmPm As String, hr As Long
  GetLocalTime ST 'adjust to local time                   
  d$ = Choose$(ST.wDayOfWeek + 1, "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") & ", " '& _
  d$ = d$ & Choose$(ST.wMonth, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December") 
  d$ = d$ & Str$(ST.wDay) & "," & Str$(St.wYear)
'
  AmPm$ = " am" 
'
  hr = st.Whour
'
  if Hr > 11 then AmPm$ = " PM" 
'
  If hr > 12 Then  hr = hr - 12
'
  d$ = d$ & Using$(" @ #:##", hr,st.Wminute) & AmPm$
'
  Function = d$
'
End Function
'
'Sample Use
Function PBMain () As Long
  ? Full_Date_Time
End Function                   
'