a1200   NEWS   APPS   DOCS   ABOUT
a1200
----
a1200
----
Autodocs
 Libraries:
 dos.library
  AbortPkt
  AddBuffers
  AddDosEntry
  AddPart
  AddSegment
  AllocDosObject
  AssignAdd
  AssignLate
  AssignLock
  AssignPath
  AttemptLockDosList
  ChangeMode
  CheckSignal
  Cli
  CliInitNewcli
  CliInitRun
  Close
  CompareDates
  CreateDir
  CreateNewProc
  CreateProc
  CurrentDir
  DateStamp
  DateToStr
  Delay
  DeleteFile
  DeleteVar
  DeviceProc
  DoPkt
  DupLock
  DupLockFromFH
  EndNotify
  ErrorReport
  ExAll
  ExAllEnd
  ExNext
  Examine
  ExamineFH
  Execute
  Exit
  FGetC
  FGets
  FPutC
  FPuts
  FRead
  FWrite
  Fault
  FilePart
  FindArg
  FindCliProc
  FindDosEntry
  FindSegment
  FindVar
  Flush
  Format
  FreeArgs
  FreeDeviceProc
  FreeDosEntry
  FreeDosObject
  GetArgStr
  GetConsoleTask
  GetCurrentDirName
  GetDeviceProc
  GetFileSysTask
  GetProgramDir
  GetProgramName
  GetPrompt
  GetVar
  Info
  Inhibit
  Input
  InternalLoadSeg
  InternalUnLoadSeg
  IoErr
  IsFileSystem
  IsInteractive
  LoadSeg
  Lock
  LockDosList
  LockRecord
  LockRecords
  MakeDosEntry
  MakeLink
  MatchEnd
  MatchFirst
  MatchNext
  MatchPattern
  MatchPatternNoCase
  MaxCli
  NameFromFH
  NameFromLock
  NewLoadSeg
  NextDosEntry
  Open
  OpenFromLock
  Output
  ParentDir
  ParentOfFH
  ParsePattern
  ParsePatternNoCase
  PathPart
  PrintFault
  PutStr
  Read
  ReadArgs
  ReadItem
  ReadLink
  Relabel
  RemAssignList
  RemDosEntry
  RemSegment
  Rename
  ReplyPkt
  RunCommand
  SameDevice
  SameLock
  Seek
  SelectInput
  SelectOutput
  SendPkt
  SetArgStr
  SetComment
  SetConsoleTask
  SetCurrentDirName
  SetFileDate
  SetFileSize
  SetFileSysTask
  SetIoErr
  SetMode
  SetOwner
  SetProgramDir
  SetProgramName
  SetPrompt
  SetProtection
  SetVBuf
  SetVar
  SplitName
  StartNotify
  StrToDate
  StrToLong
  SystemTagList
  UnGetC
  UnLoadSeg
  UnLock
  UnLockDosList
  UnLockRecord
  UnLockRecords
  VFPrintf
  VFWritef
  VPrintf
  WaitForChar
  WaitPkt
  Write
  WriteChars
Include
GuruMeditation
Docs » Autodocs » dos.library » StrToDate

NAME

	StrToDate -- Converts a string to a DateStamp (V36)

SYNOPSIS

	success = StrToDate( datetime )
D0 D1
BOOL StrToDate( struct DateTime * )

FUNCTION

	Converts a human readable ASCII string into an AmigaDOS
DateStamp.

INPUTS

	DateTime - a pointer to an initialized DateTime structure.
The DateTime structure should be initialized as follows:
dat_Stamp - ignored on input.
dat_Format - a format byte which specifies the format of the
dat_StrDat. This can be any of the following (note:
If value used is something other than those below,
the default of FORMAT_DOS is used):
FORMAT_DOS: AmigaDOS format (dd-mmm-yy).
FORMAT_INT: International format (yy-mmm-dd).
FORMAT_USA: American format (mm-dd-yy).
FORMAT_CDN: Canadian format (dd-mm-yy).
FORMAT_DEF: default format for locale.
dat_Flags - a flags byte. The only flag which affects this
function is:
DTF_SUBST: ignored by this function
DTF_FUTURE: If set, indicates that strings such
as (stored in dat_StrDate) "Monday"
refer to "next" monday. Otherwise,
if clear, strings like "Monday"
refer to "last" monday.
dat_StrDay - ignored bythis function.
dat_StrDate - pointer to valid string representing the date.
This can be a "DTF_SUBST" style string such as
"Today" "Tomorrow" "Monday", or it may be a string
as specified by the dat_Format byte. This will be
converted to the ds_Days portion of the DateStamp.
If this pointer is NULL, DateStamp->ds_Days will not
be affected.
dat_StrTime - Pointer to a buffer which contains the time in
the ASCII format hh:mm:ss. This will be converted
to the ds_Minutes and ds_Ticks portions of the
DateStamp. If this pointer is NULL, ds_Minutes and
ds_Ticks will be unchanged.

RESULT

	success	- a zero return indicates that a conversion could
not be performed. A non-zero return indicates that the
DateTime.dat_Stamp variable contains the converted
values.

SEE ALSO

DateStamp(), DateToStr(), <dos/datetime.h>

Comments

Name:
E-mail: Use this if you want a message if you get a response, will not be shown.
Comment:
Select correct short for:

Sanity

DJ
SCX
SNT
DC

Comments:

$VER: d0.se 1.14 Copyright © 2011-2024 Tobias Geijersson support at d0 dot se