Solved

given a date (10/19/98) how do your determine the week day?

Posted on 1998-10-19
1
169 Views
Last Modified: 2010-03-05
What is the easiest way to determine the day of week when given only a date such as 10/19/97 ? In other words, how do I find out if 10/19/97 is a Monday, Tuesday, ect?
0
Comment
Question by:edwardk091997
1 Comment
 
LVL 5

Accepted Solution

by:
b2pi earned 50 total points
ID: 1205499
Download and install Date::Calc from www.perl.com or whereever.  Then



use Date::Calc;

$a = '10/19/97';
($m, $d, $y) = split(/\//, $a);
$dow = Date::Calc::Day_of_Week($y, $m, $d); # gives 6
$dowtext = Date::Calc::Day_of_Week_to_Text($dow); # gives 'Saturday'


0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
execute pl/sql block from perl program 3 118
perl match and sort unique result 2 129
Excel to CSV conversion with specific columns 5 74
Awk Question 2 123
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now