May 25, 2006 #1 user222 Technical User Joined Nov 11, 2005 Messages 5 Location GB trying to calculate DOB with no decimal place but its showing the decimal places. can anyone help? using =((Now())-([DOB]))/364
trying to calculate DOB with no decimal place but its showing the decimal places. can anyone help? using =((Now())-([DOB]))/364
May 25, 2006 #2 bborissov Programmer Joined May 3, 2005 Messages 5,167 Location BG Convert it to integer. Code: CAST(((Now())-([DOB]))/364 as integer) -- or Convert(int,((Now())-([DOB]))/364) Borislav Borissov VFP9 SP1, SQL Server 2000/2005. Upvote 0 Downvote
Convert it to integer. Code: CAST(((Now())-([DOB]))/364 as integer) -- or Convert(int,((Now())-([DOB]))/364) Borislav Borissov VFP9 SP1, SQL Server 2000/2005.
May 25, 2006 Thread starter #3 user222 Technical User Joined Nov 11, 2005 Messages 5 Location GB just tried both these on my access form and I get (VALUE??) Upvote 0 Downvote
May 25, 2006 #4 macleod1021 Programmer Joined Mar 10, 2006 Messages 642 Location US Access doesn't allow the same commands as SQL, you should ask this in the Access forum. Upvote 0 Downvote
May 25, 2006 #5 spizotfl MIS Joined Aug 17, 2005 Messages 345 Location US in vba to cast to an int use CInt() "Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything." -Vonnegut Upvote 0 Downvote
in vba to cast to an int use CInt() "Maturity is a bitter disappointment for which no remedy exists, unless laughter can be said to remedy anything." -Vonnegut
May 25, 2006 Thread starter #6 user222 Technical User Joined Nov 11, 2005 Messages 5 Location GB thank you all. I have sorted it by using =Int(((Now())-([DOB]))/364) Upvote 0 Downvote
May 25, 2006 #7 SQLBill MIS Joined May 29, 2001 Messages 7,777 Location US Glad you solved it, but you do need to post in the proper forum. This is for Microsoft's SQL Server. -SQLBill Posting advice: FAQ481-4875 Upvote 0 Downvote
Glad you solved it, but you do need to post in the proper forum. This is for Microsoft's SQL Server. -SQLBill Posting advice: FAQ481-4875