Discussion:
Overload a system function like FormatDateTime with a user-defined one ?
(too old to reply)
R.Wieser
2019-05-09 07:23:12 UTC
Permalink
Hello all,

I'm using timestamps and wanted to display them in a certain way. Though
when I took a look at "FormatDateTime" I found I could only have it return
one of five pre-defined formats, none of which served my purpose. So I
wrote my own, using a formatting string.

The thing is, the name of the system function is quite appropriate for what
my function is doing: FormatDateTime.

tl;dr:
Can I have the VBScript engine pick the right function depending on the
types of the provided arguments ?

I don't think its possible, but it doesn't hurt to ask. :-)

Regards,
Rudy Wieser
GS
2019-05-09 09:20:02 UTC
Permalink
Post by R.Wieser
Hello all,
I'm using timestamps and wanted to display them in a certain way. Though
when I took a look at "FormatDateTime" I found I could only have it return
one of five pre-defined formats, none of which served my purpose. So I
wrote my own, using a formatting string.
The thing is, the name of the system function is quite appropriate for what
my function is doing: FormatDateTime.
Can I have the VBScript engine pick the right function depending on the types
of the provided arguments ?
I don't think its possible, but it doesn't hurt to ask. :-)
Regards,
Rudy Wieser
Whenever I name a VB UDF after an existing one I use an underscore like so...

Public Function Format_DateTime$(iFormat%)

..where iFormat specifies the index of the pre-defined (string) formats to use
according to their (named) position in an Enum. You can remove the Type symbols
for use with VBS.
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-09 09:44:26 UTC
Permalink
GS,
Post by GS
Whenever I name a VB UDF after an existing one I use an underscore like so...
Yes, naming the function differently is ofcourse the easiest solution.
Currently I've named my function "GetDateFormatted" - which does pretty much
cover what its doing.

But I really would like to know if VBScript knows (how to handle) function
overloading.


... Or even if it knows how to replace a system function and still be able
to call the replaced one (something I saw used in another langueage).

Regards,
Rudy Wieser
GS
2019-05-09 18:33:07 UTC
Permalink
Post by R.Wieser
GS,
Post by GS
Whenever I name a VB UDF after an existing one I use an underscore like so...
Yes, naming the function differently is ofcourse the easiest solution.
Currently I've named my function "GetDateFormatted" - which does pretty much
cover what its doing.
But I really would like to know if VBScript knows (how to handle) function
overloading.
... Or even if it knows how to replace a system function and still be able to
call the replaced one (something I saw used in another langueage).
Regards,
Rudy Wieser
My impression is that MS is looking to deprecate VBS in favor of something more
suitable for web apps and so I doubt they'll want to 'upgrade' VBS with
function/method overloading features. Home-grown is the way to go as I see it!

Now you can build your own overloaded functions for C# (and some of the other
languages), but not to work/run like a VBS script.
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-10 07:15:18 UTC
Permalink
GS,
Post by GS
My impression is that MS is looking to deprecate VBS in favor of something
more suitable for web apps and so I doubt they'll want to 'upgrade' VBS
with function/method overloading features.
I think there is some kind of misunderstanding here. I just wanted to know
if its (or something like it) available /now/.
Post by GS
Home-grown is the way to go as I see it!
So ? Any other methods available to create the same effect (even just to
see if its possible) ?

Regards,
Rudy Wieser
Mayayana
2019-05-10 12:41:57 UTC
Permalink
"R.Wieser" <***@not.available> wrote

| So ? Any other methods available to create the same effect (even just to
| see if its possible) ?
|

VB has optional parameters, but not VBS. Personally
I think it's a very dumb idea, lending itself to errors.
So I've never actually used an optional parameter.
But that's just my preference.

I have used multi-purpose functions. For instance:

ProcessThisText(sTheText, TheTarget)

Where TheTarget would probably be a numeric value.
For instance, if I needed to same function to prepare
text strings for multiple text windows, TheTarget could
be used to specify which window it goes to.

I'm curious what you want to do. It's hard for me
to imagine a necessary purpose for such tricky ambiguity
in function design.
R.Wieser
2019-05-10 16:11:46 UTC
Permalink
Mayayana,
Post by Mayayana
I'm curious what you want to do.
In that case I would suggest you (re)read my initial message. I explained
it there.

But in short: To add functionality to an already existing function. In this
case, a formatting string to complement a few numeric options.
Post by Mayayana
It's hard for me to imagine a necessary purpose
for such tricky ambiguity in function design.
:-) Than I hope you never try your hand at a language like one of the C
{something} variants, as they are rather common there.

But to give an example:
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function

Regards,
Rudy Wieser
GS
2019-05-10 17:13:25 UTC
Permalink
Post by R.Wieser
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function
This is what I was trying to pass along!
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-10 18:57:00 UTC
Permalink
GS,
Post by GS
Post by R.Wieser
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function
This is what I was trying to pass along!
WHAT where you trying to pass along ?

Because when I declare /my/ "FormatDateTime" function I will lose access to
the system function. Something I do NOT want. Which I tried to make
clear in my second post with "and still be able to call the replaced one".

So, all I need now is how to call the origional, replaced function. Can
you at least pass /that/ along ? 'Cause without it being able to replace
a(n origional) system function is /absolutily worthless/ to me.

Regards,
Rudy Wieser
GS
2019-05-10 19:23:08 UTC
Permalink
Post by R.Wieser
GS,
Post by GS
Post by R.Wieser
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function
This is what I was trying to pass along!
WHAT where you trying to pass along ?
Because when I declare /my/ "FormatDateTime" function I will lose access to
the system function. Something I do NOT want. Which I tried to make
clear in my second post with "and still be able to call the replaced one".
So, all I need now is how to call the origional, replaced function. Can you
at least pass /that/ along ? 'Cause without it being able to replace a(n
origional) system function is /absolutily worthless/ to me.
Regards,
Rudy Wieser
Ok, I'll try to explain more clearly...

My Format_DateTime$(iFormat%) function takes the iFormat arg and puts it to a
Select Case struct that returns the desired date or time format. This in turn
sets a global date or time variable to that format which in turn is used by the
project thereafter.

I assume that what you want is a procedure to take a DateTime value and return
it in a specific string format -OR- specific Date format IN A SINGLE function
as you could do in a language that supports using several methods with a SINGLE
NAME as .NET Framework class method 'overloads'.

I'm just proposing a single multi-task function to do the same thing! You just
need to change your mindset FROM thinking 'overloading' a method TO using
'multi-task' functions instead!
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-11 07:39:04 UTC
Permalink
GS,
Post by GS
Ok, I'll try to explain more clearly...
My Format_DateTime$(iFormat%) function
And I'll stop you just there. Using two functions with different names is
NOT in any way what I asked for.

In my posted example you see two calls USING THE SAME FUNCTION NAME. One of
those calls is supposed to go to the system function, the other to a
function I wrote myself.

/How/ that can be made possible is upto debate. Nothing else.
Post by GS
I'm just proposing a single multi-task function to do
the same thing!
1) You should have made that a bit more clear. Maybe like "I have no idea
how to do what you're asking for but maybe you can use the following
instead". To which I than would have answered: (see #2).

2) It would be rather stupid to call that new function only to have it call
the actual function instead of just calling the actual function directly.

The whole idea of overloading is to /extend the capabilities/ of a certain
(build-in) function. Definitily /not/ to just introduce complexity where
none is needed.


As for the "something like it" I mentioned ? That was in regard to when
only a /replace/ of the the function would be possible (as it appears to be
with VBScript), but than being able to call the replaced (build-in) function
anyway (do you know how ?). Like some other languages do by adding a
certain prefix to the function name, which than always refers to the
build-in function table.

But, maybe even by a much simpler "call the replaced function" (parent?)
construction (which would also allow for the stacking of function
replacements).

Do /I/ now have made myself clear ?

Regards,
Rudy Wieser
Evertjan.
2019-05-11 09:31:04 UTC
Permalink
Post by R.Wieser
/How/ that can be made possible is upto debate. Nothing else.
You are severely mistaken in the use of usenet NGs.

You are not in charge of a thread, even if you are the OP.
Post by R.Wieser
2) It would be rather stupid to call that new function only to have it
call the actual function instead of just calling the actual function
directly.
No, It would not.

This is often done in scripts.

For instance to make intricate debugging possible,
and [temporarily or finally] remark-out such.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mayayana
2019-05-11 10:59:06 UTC
Permalink
"Evertjan." <***@inter.nl.net> wrote

| > 2) It would be rather stupid to call that new function only to have it
| > call the actual function instead of just calling the actual function
| > directly.
|
| No, It would not.
|
| This is often done in scripts.
|
| For instance to make intricate debugging possible,
| and [temporarily or finally] remark-out such.
|

And, of course, that's basically the role of a function:
to call a series of other functions in order to accomplish
a task.
Mayayana
2019-05-10 17:21:36 UTC
Permalink
"R.Wieser" <***@not.available> wrote

| But to give an example:
| FormatDateTime(date, value) 'system function
| FormatDateTime(date, formatting string) 'my function
|

I guess I don't get it. Overloading would be to
have one function work differently depending on
parameters. You're just asking if you can use
an existing keyword or function name and somehow
hope that WSH doesn't notice.
GS
2019-05-10 18:06:55 UTC
Permalink
Post by Mayayana
Post by R.Wieser
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function
I guess I don't get it. Overloading would be to
have one function work differently depending on
parameters. You're just asking if you can use
an existing keyword or function name and somehow
hope that WSH doesn't notice.
Overloading in the current C languages supports multiple methods with the same
name but different parameters; - which combo of params you use determines which
version the compiler uses.

I've been doing similar in VB_ projects for years by passing an action index to
a single function to tell it what to do; - the function may also have other
args but the only one I use for Format_DateTime() is an index to tell it which
date or time format to return.

I'm in the process of converting all my stuff to C# and so far all is going
well. While it's possible to convert my multi-task functions to overloaded
ones, I don't yet see their point (other than to simplify naming and persist
further support of unnecessary bloating)! Single multi-task functions use
'Case' branching for actions to take for a common purpose. For example, my
GetInfo_FromWMI() function contains all the code necessary for all the various
WMI queries I use for my licensing methodology to return a delimited string for
a license profile MachineID property consisting of:

Make, Model, Mainboard SerialNumber,BIOS SerialNumber

The process involves using GoTo statements to control the order the info is
collected from the various WMI classes when the 'Case' statements don't
necessarily follow any order. This has been working well for 15+ years and so I
don't see any point in 'breaking' it just because the .NET Framework supports
the 'new and improved' feature of method overloading.
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-10 18:52:16 UTC
Permalink
Post by Mayayana
Post by R.Wieser
FormatDateTime(date, value) 'system function
FormatDateTime(date, formatting string) 'my function
I guess I don't get it. Overloading would be to
have one function work differently depending on
parameters. You're just asking if you can use
an existing keyword or function name and somehow
hope that WSH doesn't notice.
Garry, you should be carefull how you're quoting.

In the above I said whats behind the ">>>" prefixes, Mayayana said whats
behind the ">>" ones.

The way you made it look is that someone you didn't mention said whats
behind the ">>>" prefixes, and /I/ said whats behind the ">>" ones. :-(

Regards,
Rudy Wieser
Mayayana
2019-05-10 19:45:34 UTC
Permalink
"GS" <***@v.invalid> wrote

| Overloading in the current C languages supports multiple methods with the
same
| name but different parameters; - which combo of params you use determines
which
| version the compiler uses.
|

I get that, but it's not what Rudy was trying to do.
He's just asking for a way to name his function with
a name already taken.

| I've been doing similar in VB_ projects for years by passing an action
index to
| a single function to tell it what to do;

Yes, I do that, too. Much less prone to confusion
than overloading.
GS
2019-05-10 19:53:03 UTC
Permalink
Post by Mayayana
He's just asking for a way to name his function with
a name already taken.
Yes, I get that BUT VB_ doesn't support it and so an alternative must be used.
I prefer a single multi-task function over individual task-specific procedures
and so why I'm suggesting the described approach.<g>
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-11 07:59:46 UTC
Permalink
GS,
Post by GS
Yes, I get that BUT VB_ doesn't support it and so an alternative must be used.
THAT should have been the first thing you should have said, /before/
suggesting your alternative solution.

... I would not have believed you on your word (VBS does allow function
replacing, and it stands to reason the developers would have realized the
problems that that would cause when replacing build-in functions and likely
created a solution for it), but it would than have been clear where your
suggestion came from.

But for the record: If I am able to create a date/time formatting function
using a formatting string (as I mentioned in my first post) than don't you
think I would likely be able to come up with a 'write another function and
decide there what to actually do' myself ? Writing such a (switch case ?
if-else if ?) function isn't really rocket science you know ... :-)

Regards,
Rudy Wieser
Evertjan.
2019-05-11 09:31:50 UTC
Permalink
Post by R.Wieser
Post by GS
Yes, I get that BUT VB_ doesn't support it and so an alternative must be used.
THAT should have been the first thing you should have said, /before/
suggesting your alternative solution.
More important. VB is off topic, this NG is about VBS.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
GS
2019-05-11 18:47:20 UTC
Permalink
Post by Evertjan.
Post by R.Wieser
Post by GS
Yes, I get that BUT VB_ doesn't support it and so an alternative must be used.
THAT should have been the first thing you should have said, /before/
suggesting your alternative solution.
More important. VB is off topic, this NG is about VBS.
VB_ refers to any derivative language represented by the underscore. Should I
have used ? instead?
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
GS
2019-05-11 18:56:39 UTC
Permalink
Post by R.Wieser
GS,
Post by GS
Yes, I get that BUT VB_ doesn't support it and so an alternative must be used.
THAT should have been the first thing you should have said, /before/
suggesting your alternative solution.
Frankly, given your years of experience coding VBS, I'm shocked that you would
even have to ask *knowing full well* that overloading is a more recent
development language feature *AND* there has not been (nor likely to be) any
upgrade to VBScript for some years to suggest it might support overloading.
Post by R.Wieser
... I would not have believed you on your word (VBS does allow function
replacing, and it stands to reason the developers would have realized the
problems that that would cause when replacing build-in functions and likely
created a solution for it), but it would than have been clear where your
suggestion came from.
But for the record: If I am able to create a date/time formatting function
using a formatting string (as I mentioned in my first post) than don't you
think I would likely be able to come up with a 'write another function and
decide there what to actually do' myself ? Writing such a (switch case ?
if-else if ?) function isn't really rocket science you know ... :-)
Exactly why I'm shocked you had to ask!<g>
Post by R.Wieser
Regards,
Rudy Wieser
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-11 20:19:38 UTC
Permalink
GS,
Post by GS
Frankly, given your years of experience coding VBS,
Don't throw with stuff you have zero way of knowing.
Post by GS
I'm shocked that you would even have to ask *knowing full well* that
overloading is a more recent development language feature
Nope, I didn't. Why the hell should I ask when I would already know the
answer ? Thats not the kind of game I like to play, sorry.
Post by GS
*AND* there has not been (nor likely to be) any upgrade to VBScript for
some years to suggest it might support overloading
Which was, as I'm not mentioning for the umptied time now, the reason why I
mentioned "or something like it". I even described what it could look like
for god sake !
Post by GS
Post by R.Wieser
But for the record: If I am able to create a date/time formatting
function using a formatting string
...
Post by GS
Exactly why I'm shocked you had to ask!<g>
No. The actual shocker is that you thought you should post a novice-level
solution to someone who you could have known is /at least/ a bit above it.

But for the record: half of the "overloading" is already there, in the
form of being able to name a function the same as an existing one or even a
build-in one (that last bit surprised me by the way). The only thing that
I can't find is how to access the replaced one. Multiple possible methods
exist, some of which I even explained. Others I've tested, but would not
work.

Bottom line ? I've done my stinking best to explain what I was after and
to indicate, further down the thread, what I thought would be possibilities
in this regard (in the hope it would ring a bell somewhere) - only to have
everything bluntly ignored. not. a. single. word. Am I a happy camper ?
Hell no. :-(

Regards,
Rudy Wieser
R.Wieser
2019-05-12 07:24:15 UTC
Permalink
FYI, I just did create a POC for "something like it".

Though its too cumbersome (dynamic replacement) and too limited (cannot
apply it to build-in functions among other things) to be of any real value
to me.

Bummer.

Regards,
Rudy Wieser

Mayayana
2019-05-11 20:36:36 UTC
Permalink
"GS" <***@v.invalid> wrote

| Frankly, given your years of experience coding VBS, I'm shocked that you
would
| even have to ask

I think this is Rudy's hobby for his sunset years.
Some people yell and complain about the government.
Rudy increasingly chooses to insult people and attempt
impossible coding projects. He used to be cranky and
argumentative. Now he's just plain hostile and nonsensical.
At least he saves on Viagra, I suppose.
GS
2019-05-11 21:55:23 UTC
Permalink
Post by Mayayana
Post by GS
Frankly, given your years of experience coding VBS, I'm shocked that you
would even have to ask
I think this is Rudy's hobby for his sunset years.
Some people yell and complain about the government.
Rudy increasingly chooses to insult people and attempt
impossible coding projects. He used to be cranky and
argumentative. Now he's just plain hostile and nonsensical.
At least he saves on Viagra, I suppose.
Yeah, I well know his typical character from reading his posts over the years.
I'm not up for all the stupid back-n-forth so I'm done here!<bg>
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
R.Wieser
2019-05-11 09:12:36 UTC
Permalink
Mayayana,
Post by Mayayana
| I've been doing similar in VB_ projects for years by passing
| an action index to a single function to tell it what to do;
Yes, I do that, too. Much less prone to confusion
than overloading.
:-) Without looking at the docs, in what format does the 'FormatDateTime'
function return the result when you call it with the value 2 as the second
argument ?


And have you ever programmed in DOS ? It uses "int" as the entry point
for all system functions, using an index for a certain group followed by a
sub-index for the actual function (and sometimes a few more indices too).

Apart from a few you became to know by heart (because every program you
wrote used them) you /always/ needed a "cheat sheet" to figure out the
needed indices for the functions you didn't use all that often.

I have absolutily /no/ desire to re-implement such a system in VBScript too.
Sorry.

Regards,
Rudy Wieser
Mayayana
2019-05-11 11:49:24 UTC
Permalink
"R.Wieser" <***@not.available> wrote

| > Yes, I do that, too. Much less prone to confusion
| > than overloading.
|
| :-) Without looking at the docs, in what format does the
'FormatDateTime'
| function return the result when you call it with the value 2 as the second
| argument ?
|

Of course, your superior logic is obvious. I've decided
to take your approach. I now call all functions "And".
Though I'm having trouble with one of them. I decided
that I want And(x,y) to return x + (y * Pi). But it's not
working. If I use the format And(x,y) I get a syntax error.
If I use the format x And y the return is not right. For
example, 1 And 3 returns 1. What's wrong with this stupid
language?! I don't want it to return 1....

Maybe there's a problem with "And" itself. I'll try
"On Error" and see if that works better. My plan is to
make an entire set of math and filesystem functions,
like so: s = On Error("C:\file1.txt")

If I can teach WSH that I want that to return file
content as a string then I won't have to deal with
that tedious Textstream....

Come to think of it, though, Textstream is a nice
name. Maybe I'll use that for all the math functions.
But 1 Textstream 3 had better return 10.42 or I'm
quitting.
R.Wieser
2019-05-11 13:12:56 UTC
Permalink
Mayayana,
Post by Mayayana
Of course, your superior logic is obvious. I've decided
to take your approach. I now call all functions "And".
There you go again ...

You're unable to counter a simple example and some real-world experience and
thus you jump into a defensive attack mode. As if that will make you(r
stance) "right" or something. Newsflash: It doesn't. It just makes
you sound as if you can't argue the virtue of your own stance and/or shoot
holes into the stance of the other. You know, a simple discussions about
pros and cons.

Also, before you go on a 'call all functions "And" ' rant, try to
/understand/ what function overloading is and how it could be beneficiary to
a programmer. You do not have to /like/ it, but at least understand why
other people could.

And for the record: You're quite welcome to bring up specific problems with
overloading. When you do that you will force me (so to speak) to
reconsider my own ideas about it and, who knows, even agree with you on
things.

And as closing remark, you are ranting about something that, as I've already
mentioned before, has already been in use for quite a number of years now -
in C {something} (among others). Yeah, the language VBScript has been
written in. Do you really think that if its as bad as you want make me
believe that it would have been an integral part of such a language for so
long ? I don't think so.

Regards,
Rudy Wieser

P.s.
Using a numeric value as the second argument for what that 'FormatDateTime'
function does is rather understandable. Doesn't mean I have to like it.
:-)
R.Wieser
2019-05-10 18:46:48 UTC
Permalink
Mayayana,
You're just asking if you can use an existing keyword or
function name and somehow hope that WSH doesn't notice.
Nope. The whole idea is that it /does/ notice, but will call the correct
function depending on the ammount and types of used arguments.

In the example I gave I expect the first call to go to the system function
as it expects a number as the second argument and the second one to mine as
it expects a string there.

Regards,
Rudy Wieser
GS
2019-05-10 17:28:18 UTC
Permalink
Post by R.Wieser
GS,
Post by GS
My impression is that MS is looking to deprecate VBS in favor of something
more suitable for web apps and so I doubt they'll want to 'upgrade' VBS
with function/method overloading features.
I think there is some kind of misunderstanding here. I just wanted to know
if its (or something like it) available /now/.
My reply to your original post suggested 1 possible approach for "something
like it"!
Post by R.Wieser
Post by GS
Home-grown is the way to go as I see it!
So ? Any other methods available to create the same effect (even just to
see if its possible) ?
In reference to my suggestion to pass an index value, the function would
process that via a Select Case struct to return the desired format from a
single function.

I'm a big fan of developing reusable code! That said, this approach will work
in any programming language, including those that support overloading.
Adversely, code written in languages that support overloading will need to be
re-written to be usable in those (like VB_) that don't support it.
Post by R.Wieser
Regards,
Rudy Wieser
--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Evertjan.
2019-05-09 09:39:35 UTC
Permalink
Post by R.Wieser
Hello all,
I'm using timestamps and wanted to display them in a certain way.
Though when I took a look at "FormatDateTime" I found I could only have
it return one of five pre-defined formats, none of which served my
purpose. So I wrote my own, using a formatting string.
The thing is, the name of the system function is quite appropriate for
what my function is doing: FormatDateTime.
Can I have the VBScript engine pick the right function depending on the
types of the provided arguments ?
Sorry, the "the VBScript engine" just executes VBScript.
Post by R.Wieser
I don't think its possible, but it doesn't hurt to ask. :-)
However you can skip the MS-inbuild ideas and build your own:

function dattime(x)
dattime = two(day(x))&"-"&two(month(x))&"-"&year(x)&" "&two(hour(x))
&":"&two(minute(x))
end function

function two(x)
two = right("0" & x, 2)
end function
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Continue reading on narkive:
Loading...