By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,277 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Time Operations

P: 47
Hi
I have a DB where I calculate the work shift based on the time of day , I have the time of the day form a Timestamp field , it has "dd/mm/yyyy hh:mm:ss a.m./p.m." format, I used the Datepart function to obtain the Hour and set the shift based on it but now I need to define the shift based on half hours and I dont know what function I need to use to obtain the time of the day on a "hh:mm" format and then use it on IIF function to obtain that shift number

any help will be appreciated

Raymundo Walle
Feb 16 '10 #1
Share this Question
Share on Google+
2 Replies


Delerna
Expert 100+
P: 1,134
I don't know of 'A' function to do that but simple string manipulation will get it for you.

Expand|Select|Wrap|Line Numbers
  1. t: CStr(DatePart("h",Now())) & ":" & CStr(DatePart("n",Now()))
  2.  
Feb 17 '10 #2

P: 47
Delerna:

Tks for your response its running now

R Walle
Feb 17 '10 #3

Post your reply

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