View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Basic question about dates

"Auric__" wrote:

You get an overflow because CInt tries to cram whatever you pass it
into a
16-bit integer, which has a max value of 32,767. Use CLng()
instead.


Great, that's what I was looking for!

Is there a function that does the reverse? For example, if the
input is
a long number, the output will be a Date string or Date value?


The ImmediateWindow is your friend!

12/17/2015
?clng(date)
42355

?cdate(42355)
12/17/2015

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion