Date Difference Function
Erne
ernestogiannotta at tiscalinet.it
Mon Jul 4 13:08:36 CDT 2005
Hi Ivan,
On 04-lug-05, at 12:25, Ivan Smahin wrote:
> Hello Erne,
>
> Monday, July 4, 2005, 1:00:17 PM, you wrote:
>
> E> yep! that's a part of what I was looking for... (so what's the
> use of
> E> DatePart function ?)
>
> DatePart is a common function for all cases - including quarter,
> weeks and so on.
>
well, there I see functions for these as well...
anyway, more is better than less ;-)
> E> so I didn't find a better way to build this comparison date
> E> than pass a date string to the method that will be coerced into a
> E> date type by the parser
>
> E> trouble is that if Date format used in DB should change (say
> from MDY
> E> to DMY)
> E> I must update the Method formula
> E> is there a way to build a date that not depends on format things
> like
> E> Separator (db.DateSep) and dateparts order?
>
> DateField has such method as set_Year, set_Month, set_Day or
> something similar.
> You could try this API way instead of string-based approach.
>
Deal is I must pass this Date to a method (or SQL) expression, not to
a vDateField
simply put, is there a way to pass a date to a Method field other
than the string approach?
e.g.
I have a method field of type Date
I want to put some date into it
Now I do:
DateMethod.MethodText = GetDate('12/03/2005')
but this depends on Date format settings
maybe we could have also a GetDate function that takes integers as
parameters
and always in the YMD order so that we could also declare:
DateMethod.MethodText = GetDate(2005, 12, 3)
and get away with that
what do you think?
Cool Runnings,
Erne.
/ |\ |\ | /
– |/ | \ | –
\ |\ | \| \
More information about the Valentina
mailing list