[Gambas-user] Adding a date to a number

acidblue sunblaster5 at ...626...
Thu Aug 9 22:42:38 CEST 2012


I tried this and it works fine. 
Dim $date As Date
   $date = DateBox1.Value + vbxFlwrTime.Value
  txtFin.Text = $date


acidblue wrote:
> 
> I have a date box that I want to use for adding a number of days to.
> EX: say user picks date 9/10/12(American style date format) and enters
> 30 days in a value box to add to the date and then display that in
> another text box.
> 
> But I'm not sure what the formula in Gambas is for adding dates.
> 
> I want to this: date + 30 days = future date 
> 9/10/12 + 30 = 10/10/12.
> $date = dateBox.Value + 30 
> Is there a function for formating dates??
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> 

-- 
View this message in context: http://old.nabble.com/Adding-a-date-to-a-number-tp34279055p34279093.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list