Date Difference Function
Ivan Smahin
IvanSmahin at public.kherson.ua
Mon Jul 4 14:33:22 CDT 2005
Hello Erne,
Monday, July 4, 2005, 2:08:36 PM, you wrote:
E> Hi Ivan,
E> 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.
>>
E> well, there I see functions for these as well...
E> 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.
>>
E> Deal is I must pass this Date to a method (or SQL) expression, not to
E> a vDateField
E> simply put, is there a way to pass a date to a Method field other
E> than the string approach?
E> e.g.
E> I have a method field of type Date
E> I want to put some date into it
E> Now I do:
E> DateMethod.MethodText = GetDate('12/03/2005')
E> but this depends on Date format settings
E> maybe we could have also a GetDate function that takes integers as
E> parameters
E> and always in the YMD order so that we could also declare:
E> DateMethod.MethodText = GetDate(2005, 12, 3)
E> and get away with that
E> what do you think?
Put it to the Mantis please as feature request.
--
Best regards,
Ivan mailto:IvanSmahin at public.kherson.ua
More information about the Valentina
mailing list