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

Re: I hate dates



Hey Peter,

My suggestion is not to use the predefined functions made by PeopleSoft.
Use the built in SQR functions to format the date.

For example:

let $someval = datetostr(&A.Class_authorize_dt,'YYYYMMDD')

This way you can concatenate the date to a string for the report or just
print it out.  In this form $someval will be a string.  If you want $someval
to be a date variable you must declare it as one.  Most of the date commands
must be used with the let command.

Later,

Brian Middleton
Nike Inc. Systems Engineer

 -----Original Message-----
From:   Peter Clark [mailto:PGCLARK@VAC-ACC.GC.CA]
Sent:   Thursday, February 07, 2002 5:05 AM
To:     SQR-USERS@list.iex.net
Subject:        I hate dates

Hi gang,

We have an SQR that outputs a flat file. Works great when we run it on a PC.
However, we recently moved it over to a UNIX box and we have a problem. The
8 digit dates are now coming out as 6 digit dates i.e. 20020207 is now
coming out as 020207.

We are using the PeopleSoft Datetime.sqc
e.g.
do Format-DateTime(&A.Class_authorize_dt, $out, {DEFCMP}, '', '')

on the PC, $out contains 20020207
on Unix, $out contains 020207

Same thing happens if I "show" &A.Class_authorize_dt

I've been banging my head over this for a few days now. Any help from
someone who has experienced this before and didn't suffer a concussion
because of it would be appreciated :-)

Peter

And yes, all the files (pssqr.ini, setenv.sqr, etc) in both environments are
identical.