473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Extract time and change in morning, noon, afternoon

This is what I have:

Function Value

If Not IsNull(DeadLine) Then
If TimeValue(DeadLine) = 0 Then
Value = Format(DeadLine, "dd/mm/yyyy")
Else
If DateValue(DeadLine) = 0 Then
Value = Format(DeadLine, "hh:mm")
Else
Value = Format(DeadLine, "dd/mm/yyyy, hh:mm")
End If
Value = Value & " uur"
End If
Value = Value
End If

If Not IsNull(Me.EstimatedTime) Then
If Value > "" Then
Value = Value & ", "
End If
Value = Value & "duur ca." & Format(Me.EstimatedTime, "0.0#") & " uur."
End If

End Function




So I want to take the hour from this:

Function TimeOfDay()
If TimeValue(Me.DeadLine()) < 11 Then
TimeOfDay = "Morning"
End if

If TimeValue(Me.DeadLine()) =>11 AND TimeValue(Me.DeadLine()) < 13 Then
TimeOfDay = "Noon"
End if

If TimeValue(Me.DeadLine()) => 13 Then
TimeOfDay = "Afternoon"
End if
End Function



But it doesn't work ....

Can you help me plz?
Thanks.
Dec 18 '07 #1
0 839

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Gerrit Holl | last post by:
Hi, I have a dictionairy containing DateTime objects as keys and integers as values. What would be the easiest way to create a simple plot of these, with a number axis versus a time axis? What...
17
by: Mike A | last post by:
Hi, I'm hoping someone can help me with this. I have a URL for which I'd like to limit access to by time. For example,say I have a URL that I don't want accessable on Monday mornings between...
1
by: VB Programmer | last post by:
I want my web page to take the current time and either say "Good Morning/Afternoon or Evening". Any ideas how I can do this? I tried this but it's taking the times as strings... Dim strMyTime...
3
by: DP | last post by:
hi, i've got this peice of code; <script language= "JavaScript"> var today = new Date(); var hourOfDay = today.getHours(); var message = " and welcome to MIS "; if (hourOfDay >=0 &&...
1
by: magix | last post by:
Hi, Do you have any javascript available for changing images according to time ? let say Morning (7am-12pm), using images 1 (e.g morning.jpg) Afternoon (12 - 6pm), using images 2 (e.g...
6
by: D | last post by:
Hello all...I have an issue with one of my java script functions that I'm hoping someone can easily help with. I have a web based application that we use to create/sign up for overtime. When we...
6
by: dredge | last post by:
Hi, the server that hosts my PHP pages has its clock set to Greenwich Mean Time (GMT timezone 0). I need for my PHP scripts to have access to my local time which is Central Standard Time in the...
11
by: FFMG | last post by:
Hi, Given a time I want to know if it is today or yesterday, (on the server). I cannot use time difference because if I log the time and it is 23:59 and I check again at 24:01 then the...
9
by: indefatigable | last post by:
Hi, I'm sure this has been done before, but I can't seem to find this one on the net.... I have a datefield but instead of it just displaying: 07/12/18 08:30 I would like to display it...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.