UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

> Return "today" If Current Date, Actual Date Otherwise, Office 2010    
 
   
bakersburg9
post Apr 11 2012, 07:17 PM
Post #1

UtterAccess Ruler
Posts: 4,237
From: Downey, CA



I have a report that documents what I've been working on - I have a ddd format, so today Wednesday, would be Wed 5:13 p.m. for example - I'm trying to add an alias field to my query to where if the date is today's date, return Today 5:13 p.m. otherwise if it was yesterday or the day before, I want say Tues 3:57 p.m for example.

If it was a week ago, I would want the month number and day ONLY, i.e, Tues 4/3, with no time of day

here is my sql
CODE
SELECT TOP 25 tblProjectWorkLog.ID, tblProjectWorkLog.ProjID, tblProjectWorkLog.Start, tblProjectWorkLog.End, tblProjectWorkLog.Completed, tblProjectWorkLog.Notes, tblProjectWorkLog.DateUpdated
FROM tblProjectWorkLog

and the alias attempt that did NOT work:
CODE
StrtDt: IIf([start]=Date(),"Today",[start])

Go to the top of the page
 
+
 
Start new topic
Replies
raskew
post Apr 12 2012, 03:29 PM
Post #2

UtterAccess Guru
Posts: 805



QUOTE
bob - thx but I didn't get the CatID part

'**********************************************
This was just a field in my test table.
It's not significant to the Switch()function and can be eliminated without harm.

Bob
Go to the top of the page
 
+

Posts in this topic


Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 22nd May 2013 - 06:55 AM