May 25, 2006 #1 user222 Technical User Nov 11, 2005 5 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 May 3, 2005 5,167 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 Nov 11, 2005 5 GB just tried both these on my access form and I get (VALUE??) Upvote 0 Downvote
May 25, 2006 #4 macleod1021 Programmer Mar 10, 2006 642 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 Aug 17, 2005 345 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 Nov 11, 2005 5 GB thank you all. I have sorted it by using =Int(((Now())-([DOB]))/364) Upvote 0 Downvote
May 25, 2006 #7 SQLBill MIS May 29, 2001 7,777 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