Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - cdtos(<c date>, <c format>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 CDTOS(<C date>, <C format>)
 Converts any format character type date to a date string.
 Returns <expC> date string of any format <C date> in the format "YYYYMMDD".

 CDTOS() takes an character date in any format.

 <C format> is specified as YY or YYYY for year,
                            MM for month, and DD for day

 <C format> must be same length as <expC date> and contain
 delimiters in the same positions

 The return date string may be valid or invalid depending on
 the contents of <C date>.  Invalid date strings can be made
 valid with MAKEDATE().

 Useful where dates are maintained as character type either from
 converted dBASE II programs or where the application design
 requires bypassing the automatic validation of the date type.

 Current century is assumed if <C date> has a two-digit year.

 Does not trap invalid entries in <C date> or verify
 that <C date> is in the format defined by <C format>.

 * These are all December 10, 1986, and each return "19861210".
 CDTOS( "121086", "MMDDYY" )
 CDTOS( "86/12/10", "YY/MM/DD" )
 CDTOS( "10.12.1986", "DD.MM.YYYY" )


             Placed in the Public Domain by Tom Rettig Assoc.

See Also: ISDSDATE() MAKEDATE() NTOD() STOD()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson