Today keyword?

Discussion in 'Basic4ppc Wishlist' started by JesseW, Mar 21, 2009.

  1. JesseW

    JesseW Active Member Licensed User

    Erel, if you're looking for a few new keywords, consider Today as the date part of Now. Currently, I'm using Dateparse(Date) to strip the Time element from Now.

    I'm not sure what you'd call the Time part of Now... perhaps RightNow??? :sign0161:
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Time(ticks) return the time of day part.
    Date(ticks) return the date.
    Try:
    Code:
    Msgbox("The date is " & date(now) & crlf & "The time is: " + time(now))
     
  3. agraham

    agraham Expert Licensed User

    I think what he means is the equivalents of "DateParse(Date(Now))" and "TimeParse(Time(Now))" as a less clumsy way of getting the ticks value for the date and time separately.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    I see.
    You can always get the ticks value which represents the beginning of day with:
    Code:
    Sub App_Start
        
    Msgbox(Date(Today(Now)), Time(Today(Now)))
    End Sub

    Sub Today (ticks)
        
    Return ticks - (ticks Mod cTicksPerDay)
    End Sub
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice