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

Re: Date output



Thanks for your reply. But that's not what I am looking for. I do not want to
hard code as you did in your example. I want to be able to output using the
format in the currently selected locale (which I don't know beforehand) and I
want to be able to output dates in different formats in different reports. For
example, if I am using the US-English locale, I want to use the mask "Mon
DD,YYYY" (the DATE-EDIT MASK for this locale) in some reports but I want to use
"MM/DD/YYYY" (INPUT_DATE_EDIT-MASK) in other reports. The same code should print
out "DD Mon,YYYY" in the first instance and "DD/MM/YYYY" in the second instance
if I am using the UK-English locale. So hard coding is out of question.

BVK




Clara Carter <clarac@RAINMAKERSYSTEMS.COM> on 08/05/99 12:11:51 PM

Please respond to SQR-USERS@list.iex.net

To:   Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
cc:    (bcc: Bvk Rao/Teloquent)
Subject:  Re: Date output



Use

let $datef = datetostr(strtodate(&column,'MM-DD-YYYY'),'Mon DD YYYY')

Make sure the first edit matches the format the date is coming in the
string, the second edit is the way you want to print it.

I'm new with informix and I haven't found a way to convert the string
to a date directly from the database. So I had to do the above.

Hope this is what you are looking for.
CC



At 11:28 AM 8/5/99 -0400, you wrote:
>Hi Everyone,
>I am new to this list. I am using SQR 4 with Informix database. I want to be
>able to output a date variable or a string variable with a date edit mask.
If I
>use the date edit mask, then SQR uses the default DATE-EDIT-MASK in SQR.INI to
>format the output. Is there some way to format the date output with a
different
>mask? Say, can I use the mask, "INPUT-DATE-EDIT-MASK" as a mask to format the
>output with? I do not want to hard-code or keep changing the formats with
>ALTER-LOCALE. I want to use a different mask if it is already available. I
>would
>appreciate any help on this issue.
>
>Thanks
>BVK Rao