Questions tagged [dayofweek]

Usually a function that returns day of the week when a certain date object is passed.

Get day of day of the week in:

691 questions
3
votes
2 answers

Batch Day the Week?

I'm wondering if I can somehow figure out what DAY of the week it is (M,T,W,T,F,S & S) though some sort of batch file. It's fine if it uses any other language, just as long as in the end, the variable %DAY% it set to the day of the week. Is there…
drcomputer
  • 406
  • 2
  • 7
  • 15
3
votes
2 answers

Map values to text "on the fly"

I have the following table: store | dow | turnover ------+-----+----------- 1 | 1 | Eu59.426,00 1 | 2 | Eu33.074,00 1 | 5 | Eu38.855,00 1 | 6 | Eu64.431,00 Please, tell me how to represent days of the week as Sunday, Monday…
Ina
  • 187
  • 2
  • 9
3
votes
1 answer

Day of the Week program Python3

It tells me I have an invalid syntax on on the Quotation around line 19: year = int(input("Enter year: ")) while (year < 1900 or year > 2100): print"Error out of range. Please re-input" I really don't know what it is. It says its around the…
Suliman Sharif
  • 607
  • 1
  • 9
  • 26
3
votes
2 answers

Mongo: Using $dayOfWeek in a $match clause when query has also a $groupy

I have a mongo document in which some registers are stored by with a date, for instance in a very simplified manner: { "vehicleId" : "vehicle4", "telemetryDate" : ISODate("2013-06-22T05:00:00Z"), "alarmsTotal" : 9 } { "vehicleId" :…
will824
  • 2,203
  • 4
  • 27
  • 29
3
votes
3 answers

System.MissingMethodException: Method not found: 'System.String .get_DayName()'

I have the following type: public class TimeBand { public string DayName { get; set; } public int customerId { get; set; } } and I am creating a list which contains TimeBands: var TimeBandList = new List { new…
03Usr
  • 3,335
  • 6
  • 37
  • 63
3
votes
1 answer

GregorianCalendar returns wrong DAY_OF_WEEK in Java

This code: Calendar calendar; calendar = GregorianCalendar.getInstance(); calendar.set(year, month, day); week_day = calendar.get(Calendar.DAY_OF_WEEK); returns wrong value. For example year=2013, month=3, day=31 returns the same value…
3
votes
3 answers

JavaScript: Convert Day/Week Into Year

I have been using Stack Overflow for a number of months now, but this is my first post. I require a function to convert a week number and and day of week into a dd/mm/yyyy format. The date values i have to work with are in the format…
3
votes
3 answers

Get next week and previous week staring and ending dates in java

I want to get the starting and ending dates of a week for example 2012-05-06 to 2012-05-12 2012-05-13 to 2012-05-19 The code I have written is currWeekCalender.add(Calendar.WEEK_OF_YEAR, 1); String dateStart = …
Adil Bhatty
  • 17,190
  • 34
  • 81
  • 118
3
votes
2 answers

Recognize DateTime String as valid when containing day names in C#

When a date string has the day of the week attached to it, TryParse fails: DateTime d; string dateString = "Tuesday May 1, 2012 9:00 AM"; return DateTime.TryParse(dateString, out d); // returns false What is the best way to deal with this so that I…
ErikE
  • 48,881
  • 23
  • 151
  • 196
2
votes
1 answer

Get day of week when using DatePickerDialog

I'm working on a kind of tricky app where the day of the week is important. To avoid to much hassle, here is my main problem: I have a DatePickerDialog where the user selects a date. I want to know what day of the week this date is. I'm thinking…
LordMarty
  • 1,551
  • 1
  • 12
  • 17
2
votes
5 answers

Get string representation of a sql DateTime day

Let's say i have a sql datetime of '1 May 2009' or '12 May 2009'. Is there any built in sql function / operation i can perform on the dates above to return the string representation of the DAY of the date? So for '1 May 2009' i'll get "Friday" as…
CODES_ONLY
  • 181
  • 2
  • 11
2
votes
1 answer

Change the week start day on DTPicker

Is it possible to change the Day of the Week that the DTPicker control uses for the first day of the week 'on the fly'? I know that it uses the system first day of the week (as defined in control panel) for this setting but can it be changed to use…
Matt Wilko
  • 26,994
  • 10
  • 93
  • 143
2
votes
1 answer

Check day of week in Android

I want to check if the current day of the week is Sunday or not. How can I find it out? I am using this in alarm activity. Please help me. I want to setup an alarm which does not work on Sunday. Thanks in advance.
picaso
  • 713
  • 2
  • 14
  • 26
2
votes
1 answer

Python/Django - Build list by Sum by day and Week

Hopefully I can explain what I am trying to accomplish. I have no problem achieving my result, but I know that this is probably not the best way to do it. I have a table with some entries by date. I am trying to take those entries from the current…
Adam Hopkins
  • 6,837
  • 6
  • 32
  • 52
2
votes
4 answers

DateTime Object Representing Day of Week

How can I convert a number between 1 and 7 into a DateTime object in C# which represents the day of the week? The numbers are coming from a XML file which I am parsing. I am retrieving each instance of a field containing a number between 1 and 7…
THE DOCTOR
  • 4,399
  • 10
  • 43
  • 64