Friday, May 31, 2013

CurrentDateTime String expression

You can generate a timestamp based unique value  using following expression. Use the below string to set the expression property of a variable :

(DT_STR, 2, 1252) DAY( GETDATE() ) +  (DT_STR, 2, 1252)MONTH( GETDATE() )+  (DT_STR, 4, 1252)YEAR( GETDATE() )+ (DT_STR, 4, 1252) DATEPART( "Hh", GETDATE() )+ (DT_STR, 4, 1252) DATEPART( "mi", GETDATE() )+ (DT_STR, 4, 1252) DATEPART( "ss", GETDATE() )+ (DT_STR, 4, 1252) DATEPART( "ms", GETDATE() )

No comments:

Post a Comment