Date Conversion in 4GL

Try "99/99/9999" instead of "DD/MM/YYYY"
I have a date field and am trying to use the following statement
assign sDate= string (xDate3 , "MM/DD/YYYY" ).


xDate3 is a date field
SDate is a character field

and am getting this error.

** Character number 1 of format MM/DD/YYYY is invalid.


Anybody got any ideas what's wrong?
It's possible you are passing 5 instead of 05 and it knows that the first
character has to be a 1 or 0 since 01-12 is the highest it can go.

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
carl.heeder
Sent: Monday, May 14, 2012 4:57 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Date Conversion in 4GL

I have a date field and am trying to use the following statement
assign sDate= string (xDate3 , "MM/DD/YYYY" ).


xDate3 is a date field
SDate is a character field

and am getting this error.

** Character number 1 of format MM/DD/YYYY is invalid.


Anybody got any ideas what's wrong?



------------------------------------

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
I believe the format needs to be:
assign sDate= string (xDate3 , "99/99/9999" ).

The date will be displayed in the date format (US or European) set by the database start-up options.

You could also use the year, day, month functions to build the string in any order and format you prefer

Jim Kinneman
Encompass Solutions, Inc

--- In vantage@yahoogroups.com, "Ned C." <TechnoBabbly@...> wrote:
>
> It's possible you are passing 5 instead of 05 and it knows that the first
> character has to be a 1 or 0 since 01-12 is the highest it can go.
>
> -----Original Message-----
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> carl.heeder
> Sent: Monday, May 14, 2012 4:57 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Date Conversion in 4GL
>
> I have a date field and am trying to use the following statement
> assign sDate= string (xDate3 , "MM/DD/YYYY" ).
>
>
> xDate3 is a date field
> SDate is a character field
>
> and am getting this error.
>
> ** Character number 1 of format MM/DD/YYYY is invalid.
>
>
> Anybody got any ideas what's wrong?
>
>
>
> ------------------------------------
>
> Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> already linked your email address to a yahoo id to enable access. )
> (1) To access the Files Section of our Yahoo!Group for Report Builder and
> Crystal Reports and other 'goodies', please goto:
> http://groups.yahoo.com/group/vantage/files/.
> (2) To search through old msg's goto:
> http://groups.yahoo.com/group/vantage/messages
> (3) To view links to Vendors that provide Vantage services goto:
> http://groups.yahoo.com/group/vantage/linksYahoo! Groups Links
>