[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Format-DateTime question



Hi group,
  I'm working on a program that will update our account code table with
dates from a flat file and the dates in the flat file are in the format
YYMMDD. In order to update the account code table, I need to reformat the
dates in native format and herein lies my question: will the
Peoplesoft-delivered sqc "Format-DateTime" let you feed a date with a
2-digit year, or do I need to append the century on to the date before
passing? Also, when I look at the documentation in the header of this sqc,
it's a little unclear to me which of the $date formats I should be using. As
you know, the standard format of this routine is:

Format-DateTime($in, $out, $date, $time, $native)

and the $date can be DEFMDY, DEFDMY, DEFYMD or DEFCMP (for date
comparisons.)

If my date coming in ($in) is YYMMDD format, and I want to convert it to
native format, I'm assuming that my statement would look like:
Format-DateTime($indate, $out, {DEFMDY},'','native') - right?

Well, the routine isn't working and I'm suspecting it's because the sqc is
expecting the incoming date to be in YYYYMMDD format, not YYMMDD format. Is
this a correct assumption? Thanks for your feedback. If you happen to reply,
since I get messages in digest format, I'd welcome a cc'd message to me
directly so I could get it during the day. Thanks!

Cheers,
Glenn Ackerson
**************************************************
Glenn Ackerson
Information Technology Professional III
Internet Address: Glenn.Ackerson@Unco.edu
University of Northern Colorado
Information Technology
Carter Hall                  Greeley, CO  80639