Welcome to MSDN Blogs Sign in | Join | Help

isTypeTime

Checking if a certain data field is of the ”time” data type is not as obvious as you may think.

Your first few attempts will most likely just tell you that the type of your field is Integer.

Here’s a job with a small snippet of code showing you how to go about this:

static void isTypeTime(Args _args)
{
    SysDictField sysDictField;
    ;
    sysDictField = new SysDictField(tableNum(ProdTable), fieldNum(ProdTable, SchedFromTime));

    print isTypeTime(sysDictField.extendedTypeId());

    sysDictField = new SysDictField(tableNum(ProdTable), fieldNum(ProdTable, ProdId));

    print isTypeTime(sysDictField.extendedTypeId()); 

    pause;
}

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Published Friday, July 28, 2006 9:26 AM by Palle Agermark

Comments

New Comments to this post are disabled
 
Page view tracker