Ok this is how stupidly i am keeping my date as string
23.12.2012 21:24:31
Now at a select query i want to cast them as BigInt and do a search
casted version : "20121223212431"
like below
select * from myTable where cast(datestring as bigint) > 20111223212431
How can i cast that kind of string to BigInt at sql server ?
Edit - why this query is not working
select (convert(datetime,LastMoveTime,104)) as myTime from myTable
where myTime < DATEADD(day,-366,GETDATE())
error : Invalid column name 'myTime'.