Date Validation Question Question

Frank
Frank
Offline
0
Does anyone have a script that will validate the date entered to insure it is not prior date. For example if I enter Requested Start dat, you will not be ablt to enter yesterday. I would also like to send a message to the user explaining the error, blank out the date field and set the cursor in that field.
Responses (3)
  • Accepted Answer

    Michael
    Michael
    Offline
    Friday, April 15 2011, 04:49 AM - #Permalink
    0
    you may want to do something like this
    sysDate = Ext.DateToDBLong(Date()) 'TeamTrack 6.6.1 dates are stored as numbers (Unix Date)
    Call Shell.Item.GetFieldValue("MY_DATE_FIELD", dateValue)
    If dateValue
    End If
    The reply is currently minimized Show
  • Accepted Answer

    Frank
    Frank
    Offline
    Friday, April 15 2011, 05:17 AM - #Permalink
    0
    Will this work the same in SBM
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, September 13 2011, 07:11 AM - #Permalink
    0
    '----------------------------------------------

    'Post - Transition Context

    'Created by Charity Pearsall

    'Created on 10/5/2010

    'Updated on 5/26/2011 to add due date restriction

    '----------------------------------------------

    '

    '-----------------------------------------------------------------

    ' Requires that Due date must be at lest today

    '-----------------------------------------------------------------

    DIM dtmDueDate, dtmToday, dtmDiff, dtmTomorrow

    Call Ext.SetCompatibilityVersion ( 7 )

    Call shell.item.GetFieldValue("REQUIRED_DUE_DATE", dtmDueDate)

    dtmToday = date()

    dtmTomorrow = DateAdd( "d", 1, dtmToday)

    dtmDiff = DateDiff( "d" , dtmTomorrow , dtmDueDate )

    If dtmDiff < 0 then

    shell.redomessage = "Requested Due Date must be greater than today."

    End If

    '
    The reply is currently minimized Show
Your Reply

Recent Tweets