Cameron was correct. See the example below that verifies a variable can be used.
However, if you are getting a deleted reference, my quess is that you are prompting the user for information, and you are not retrieving the information (stdt) correctly.
If you share your dialog, someone will help you with the extraction.
stdt = 3402950400;
show( As Date(stdt) ); // 01Nov2011;
New SQL Query(
Version( 130 ),
Connection( "JMP" ),
JMP Tables(
["Stock Averages" =>
"$Sample_Data\Stock Averages.jmp"]
),
QueryName( "SQLQuery1" ),
Select(
Column( "Date", "t1", Numeric Format( "m/d/y", "-1", "NO", "" ) ),
Column( "Open", "t1", Numeric Format( "Currency", "2", "YES", "", "USD" ) ),
Column( "High", "t1", Numeric Format( "Currency", "2", "YES", "", "USD" ) ),
Column( "Low", "t1", Numeric Format( "Currency", "2", "YES", "", "USD" ) ),
Column( "Close", "t1", Numeric Format( "Currency", "2", "YES", "", "USD" ) ),
Column(
"Moving Average",
"t1",
Numeric Format( "Currency", "2", "YES", "", "USD" )
)
),
From( Table( "Stock Averages", Alias( "t1" ) ) ),
Where(
GE(
Column( "Date", "t1", Numeric Format( "m/d/y", "-1", "NO", "" ) ),
stdt,
UI( Comparison( Base( "Continuous" ) ) )
)
)
) << Run