OK, I have had a chance to look at the FMTE^XLFDT
function, and I don't think it is fair to say that
that function can do what mine can. Here is the
documentation from the Kernal API:
-----------------------------------
$$FMTE^XLFDT(x[,y])
Input Parameters x:
(required) VA FileMan date. y:
(optional) Affects output as follows:
If null, '$D(y), return the written-out format.
If '$D(y) then return standard VA FileMan format.
If +y = 1 then return standard VA FileMan format.
If +y = 2 then return MM/DD/[EMAIL PROTECTED]:MM:SS format.
If +y = 3 then return DD/MM/[EMAIL PROTECTED]:MM:SS format.
If +y = 4 then return YY/MM/[EMAIL PROTECTED]:MM:SS format.
If +y = 5 then return MM/DD/[EMAIL PROTECTED]:MM:SS format.
If +y = 6 then return DD/MM/[EMAIL PROTECTED]:MM:SS format.
If +y = 7 then return YYYY/MM/[EMAIL PROTECTED]:MM:SS format.
If y contains a "D" then date only.
If y contains an "F" then output with leading spaces.
If y contains an "M" then only output "HH:MM".
If y contains a "P" then output "HH:MM:SS am/pm".
If y contains an "S" then force seconds in the output.
If y contains a "Z" then output with leading zeroes.
Output
returns: Returns the xternal formatted date.
-----------------------------------
This function does not allow custom creation of an
output string. You may only use the 7 predefined
outputs, with some modifications.
Things FMTE^XLFDT is NOT be able to do:
1. convert month 08 into August or Aug.
2. Access partial information... i.e. year only, month
only, day only, hour only, seconds only.
3. Include user text (as you already noted).
4. Show time in any format other than "@XX:XX". ("@"
is not widely used in displaying times outside VistA.)
5. Display time BEFORE the date
6. Any arbitrary order of displaying each data
element, intermixed with any arbitrary punctation.
An additional feature that the DateTime formatter that
I modeled from had, which my function does not (but
would be nice if added), is to allow a date to show
the days of the week. This would require some sort of
calendar calculation function that I need to find.
So maybe no one else would want the functionality that
I wanted, but at least I didn't completely waste my
time.
:-)
Kevin
--- smcphelan <[EMAIL PROTECTED]> wrote:
> It is nice you have developed a M API to convert
> dates. Everything you show
> here (except for the at exactly) has been part of
> VistA for 10 years or
> more... See XLFDT it is more robust than what you
> show here.
>
> ----- Original Message -----
> From: "Kevin Toppenberg" <[EMAIL PROTECTED]>
> To: "Hardhats Sourceforge"
> <[email protected]>
> Sent: Sunday, May 15, 2005 8:37 PM
> Subject: [Hardhats-members] Custom Fileman date
> output formatting.
>
>
> > I may have just reinvented the wheel, but I don't
> > think so. I have just finished a function that
> will
> > format fileman dates in any arbitrary way, based
> on
> > format strings. For example:
> >
> > w $$DTFormat(FMDate,"mm/dd/yy") --> 10/13/79
> > w $$DTFormat(FMDate,"mm/dd/yyyy") --> 10/13/1979
> > w $$DTFormat(FMDate,"mmm dd,yyyy") --> Oct 13,1979
> > w $$DTFormat(FMDate,"mmmm dd,yyyy") --> October
> > 13,1979
> > w $$DTFormat(FMDate,"mmmm dd,yyyy 'at exactly'
> HH:MM
> > #") --> October 13,1979 at exactly 2:15 pm
> >
> > The format string allows any mix and match order.
> It
> > has appropriate codes for formatting 24 vs 12 hr
> > clock. Month numbers, short-names, or long names.
> > Year in 2 or 4 digits. Numbers with or with-out a
> > leading 0.
> >
> > This function is based roughly on the way that
> Delphi
> > handles datetime formatting.
> >
> > If anyone wants a copy of the function let me
> know. I
> > just tried to post it on the wikki, and apparently
> the
> > Sourceforge host is down for the moment.
> >
> > Kevin
> >
> >
> >
> >
> >
> > Discover Yahoo!
> > Use Yahoo! to plan a weekend, have fun online and
> more. Check it out!
> > http://discover.yahoo.com/
> >
> >
> >
>
-------------------------------------------------------
> > This SF.Net email is sponsored by Oracle Space
> Sweepstakes
> > Want to be the first software developer in space?
> > Enter now for the Oracle Space Sweepstakes!
> >
>
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click
> > _______________________________________________
> > Hardhats-members mailing list
> > [email protected]
> >
>
https://lists.sourceforge.net/lists/listinfo/hardhats-members
> >
>
>
>
>
>
-------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space
> Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
>
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Hardhats-members mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/hardhats-members
>
Discover Yahoo!
Stay in touch with email, IM, photo sharing and more. Check it out!
http://discover.yahoo.com/stayintouch.html
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members