Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Day of week

Status
Not open for further replies.

jleboeuf

Programmer
May 2, 2001
50
CA
Hi

i convert a numeric to a date field, there's a way i can create something to find if i'm monday etc...

thx

Jleboeuf
 
Create an array that will display your day of week in text, you can do this with the following formula:

["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][dayofweek({field containing date})]

The week always starts with Sunday as 1, Monday as 2 and so on.

If you are sorting these, say in a cross-tab they will sort alphabetically. You can list the days in the first part of the array like this ["1-Sun","2-Mon","3-Tue"....] to have htem sort correctly.
 
Or if you are using v8.5, see also the WeekdayName() function to get a day of the week in text form, either in full or abreviated format, and with a optional parameter to define the first day of the week. Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top