184a2 Sorting Birthdate by month-day instead of by month-day-year
Sign Up |  Live StatsLive Stats    Articles 37,332| Comments 177,288| Members 19,416, Newest Kaylee| Online 485
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags
Sikh Philosophy Network » Sikh Philosophy Network » Current News » Information Technology » Sorting Birthdate by month-day instead of by month-day-year

Sorting Birthdate by month-day instead of by month-day-year

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
Sikh New Year Celebrations Continue All Month Narayanjot Kaur World 0 10-Apr-2010 07:55 AM
top poster of the month kds1980 Leisure 6 04-Nov-2007 08:30 AM
Youth of the Month kaur-1 Sikh Youth 1 02-Nov-2006 22:30 PM
Accending month Chey Information Technology 4 28-Jul-2006 08:08 AM
how to calculate age using a fixed month & day with "now" year CalJo Information Technology 2 11-Nov-2005 20:09 PM


Tags
sorting, birthdate, monthday, instead, monthdayyear
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 07-Nov-2005, 11:26 AM
John's Avatar John
Guest
 
Posts: n/a
   
   
Sorting Birthdate by month-day instead of by month-day-year

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I have a table that has a list of employees date of birth. That field is
named "DOB". I want to create a report that prints out everyones month and
day of birth and sorts on that instead of sorting by their month, day, and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6823-sorting-birthdate-month-day-instead-month.html
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
year.

For example say I have the following data:

Name: DOB:
employee_1 1/15/1900
employee_2 1/1/2000
employee_3 2/1/2000

I would like the data to be printed like the following:

employee_2 1/1
employee_1 1/15
employee_3 2/1

Currently sorting on DOB in the report yields the following though because
employee_1 was born before employee_2

employee_1 1/15
employee_2 1/1
employee_3 2/1

I have looked and looked and tried many different things without success.
Can anyone help me out? Thank you in advance to anyone that can help me out.

Best Regards,
John




Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-Nov-2005, 11:26 AM
Douglas J. Steele's Avatar Douglas J. Steele
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

Create a query, and add a computed field to the query: MonthDay:
Format([DOB], "mmdd"). Sort on that field.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"John" wrote in message
news:usK73lz4FHA.4076@tk2msftngp13.phx.gbl...
>I have a table that has a list of employees date of birth. That field is
>named "DOB". I want to create a report that prints out everyones month and
>day of birth and sorts on that instead of sorting by their month, day, and
>year.
>
> For example say I have the following data:
>
> Name: DOB:
> employee_1 1/15/1900
> employee_2 1/1/2000
> employee_3 2/1/2000
>
> I would like the data to be printed like the following:
>
> employee_2 1/1
> employee_1 1/15
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
> employee_3 2/1
>
> Currently sorting on DOB in the report yields the following though because
> employee_1 was born before employee_2
>
> employee_1 1/15
> employee_2 1/1
> employee_3 2/1
>
> I have looked and looked and tried many different things without success.
> Can anyone help me out? Thank you in advance to anyone that can help me
> out.
>
> Best Regards,
> John
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
>



Reply With Quote
  #3 (permalink)  
Old 07-Nov-2005, 11:26 AM
JoJa15's Avatar JoJa15
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

That worked great! I had actually tried the format command before, but
in my report and not in a query.

The problem I have now is how to display the data as mm-dd. In the
report in the format property I entered mm-dd, then I tried ##-##, then
00"-"00 and the data still displays as mmdd or 1225 for a birthday on
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
12/25/2005. I have tried this in the format property for the report and
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
for the query.

Any ideas?

- John

Reply With Quote
  #4 (permalink)  
Old 07-Nov-2005, 11:26 AM
John Vinson's Avatar John Vinson
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

On Sun, 6 Nov 2005 19:20:42 -0600, "John"
wrote:

>I have a table that has a list of employees date of birth. That field is
>named "DOB". I want to create a report that prints out everyones month and
>day of birth and sorts on that instead of sorting by their month, day, and
>year.


An alternative approach is to include a calculated field:

HappyHappy: DateSerial(Year(Date()), Month([DOB]), Day([DOB]))
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823

This will contain the current year's birthday anniversary, and can be
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
formated, sorted, searched etc. just like any other date/time field.

John W. Vinson[MVP]
Reply With Quote
  #5 (permalink)  
Old 08-Nov-2005, 12:52 PM
Dlimey's Avatar Dlimey
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

Edit the "mmdd" to "mm"&"-"&"dd" in your Format.
This should make it read with the 'dash' between month and day.
The sort will still be correct.

"JoJa15" wrote:

> That worked great! I had actually tried the format command before, but
> in my report and not in a query.
>
> The problem I have now is how to display the data as mm-dd. In the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
> report in the format property I entered mm-dd, then I tried ##-##, then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
> 00"-"00 and the data still displays as mmdd or 1225 for a birthday on
> 12/25/2005. I have tried this in the format property for the report and
> for the query.
>
> Any ideas?
>
> - John
>
>

Reply With Quote
  #6 (permalink)  
Old 08-Nov-2005, 12:52 PM
Douglas J Steele's Avatar Douglas J Steele
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

Try mm\-dd

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
(no e-mails, please!)


"JoJa15" wrote in message
news:1131329881.001483.4590@g14g2000cwa.googlegrou ps.com...
> That worked great! I had actually tried the format command before, but
> in my report and not in a query.
>
> The problem I have now is how to display the data as mm-dd. In the
> report in the format property I entered mm-dd, then I tried ##-##, then
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
> 00"-"00 and the data still displays as mmdd or 1225 for a birthday on
> 12/25/2005. I have tried this in the format property for the report and
> for the query.
>
> Any ideas?
>
> - John
>



Reply With Quote
  #7 (permalink)  
Old 08-Nov-2005, 12:53 PM
JoJa15's Avatar JoJa15
Guest
 
Posts: n/a
   
   
Re: Sorting Birthdate by month-day instead of by month-day-year

  Donate Today!  
I tried the different formating suggestions above but oddly enough this
is what worked in the fields format box on the report:

-&&

I did not get this by any knowledge but by trial and error after I
tried the two above formating suggestions.

- John

Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6823
Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
Request for assistance...
Today 04:52 AM
9 Replies, 100 Views
Panjabi
By Ishna
Today 04:40 AM
16 Replies, 305 Views
Woolwich Killing: The...
Today 03:50 AM
2 Replies, 54 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 03:09 AM
316 Replies, 7,629 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 03:00 AM
179 Replies, 4,530 Views
How does Sikhi help you...
Today 00:52 AM
31 Replies, 973 Views
Transgenderism ... Right...
By Kaylee
Today 00:33 AM
25 Replies, 1,252 Views
Losing My Religion: Why...
Today 00:00 AM
14 Replies, 379 Views
Occultism - Rejection in...
Yesterday 23:57 PM
61 Replies, 2,622 Views
Kirtan
Yesterday 21:24 PM
0 Replies, 34 Views
Keeping Amrit Vela
Yesterday 16:49 PM
12 Replies, 937 Views
Do you believe in...
Yesterday 15:08 PM
196 Replies, 4,106 Views
Black Sikhs?
Yesterday 06:33 AM
20 Replies, 5,877 Views
Man Driving Without...
Yesterday 05:06 AM
5 Replies, 147 Views
Health Exercise And...
Yesterday 02:10 AM
1 Replies, 98 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 05:34 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.40876 seconds with 32 queries
0