xmas countdown

shutzy

Registered User.
Local time
Today, 09:36
Joined
Sep 14, 2011
Messages
775
i would like to have an xmas countdown. i currently have it displaying just the amount of days. i would prefer it if it had days hours:minutes:seconds.

i have already have it on a form that has the timer set at 1000 so refresh is not a problem.

heres the function i have to display the days

=DateDiff("d",Now(),#25/12/2014#)

how do i get it to display as i would like?

thanks in advance
 
Would you be able to upload your database please :) ill have a play and if i can get it to work - ill show you the results and how its done :)
 
Use the Format() function.

Doing a proper countdown form should be a little exercise for you.
 
sorry. the database is that large now there is no way the limits would allow it. even when zipped.
 
thanks vba. i tried that but im not sure how to do it. i dont use dates much.

i did try

format(DateDiff("d",Now(),#25/12/2014#),"d hh:mm:ss")

but this didnt seem to work.

have i done something wrong with this?
 
Ahh Yes - Format() should sort it for you - 2 Text boxes one with the Date which you said is already finished - but then the other text box which is linked to the timer in which would have the format "Long Time" - try that and see how it turns out
 
Like I mentioned, it should be a little exercise for you. There are thousands of examples online, I don't want to spend time reinventing the wheel.
 
no worries i understand. i just thought it was smple enough for a quick answer
 
It's simple enough but the tonnes of examples online could give you other ideas. Here's the correct code:
Code:
Format(DateDiff("s",Now(),#25/12/2014#)/86400, "d hh:mm:ss")
 
i managed it.

text box 1 = =Format(#25/12/2014#-Now(),"0") (gives day count)
text box 2 = vba - Me.txtCountdownHoursMinutesSeconds = Format(#12/25/2014# - Now(), " hh:nn:ss")

bingo
 
Congrats Shutzy :) - Glad you made it !

Google is your friend ;)
 

Users who are viewing this thread

Back
Top Bottom