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

Re: Format-DateTime question



Hi Glenn,

You are probably correct in your assumption that PSoft is expecting a 4
digit year. Check the setting of the variable Year4 in setenv.sqc. If it's
a 1, then a four digit year is expected.

I believe that your

Format-DateTime($indate, $out, {DEFMDY},'','native')

is correctly formatted. (Format-DateTime is a bit confusing!) I do believe
that you'll have to add the century to either the $indate or $out fields. I
do not know of a way to get PSoft to convert from a two-digit to a
four-digit year.

Good luck,
Rod





"Ackerson, Glenn" <Glenn.Ackerson@UNCO.EDU>@list.iex.net> on 06/28/2001
11:11:02 AM

Please respond to sqr-users@list.iex.net

Sent by:  "Discussion of SQR,              Brio Technology's database
      reporting language"              <SQR-USERS@list.iex.net>


To:   SQR-USERS@list.iex.net
cc:

Subject:  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