Windows 10: How to output day of week to variable in batch

Discus and support How to output day of week to variable in batch in Windows 10 Support to solve the problem; Hi all, I am trying to write a batch file in Windows 10 to output day of week (Monday, Tuesday etc) to variable do that I can do certain procedures... Discussion in 'Windows 10 Support' started by jaburmester, Jan 14, 2016.

  1. How to output day of week to variable in batch


    Hi all,

    I am trying to write a batch file in Windows 10 to output day of week (Monday, Tuesday etc) to variable do that I can do certain procedures on differnt days o the week and am having major problems.

    If I type DATE /T at command prompt I get 15/01/16 and no day of week.

    I have change regional setting so that long date is in correct format but still if I type DATE /T at command prompt I get 15/01/16 and no day of week.

    All help appreciated.

    Thank you.

    :)
     
    jaburmester, Jan 14, 2016
    #1

  2. How to change "Firs day of week" from Sunday to Monday in Family Saferty setings in windows 10 settings?

    Hi Jaan,

    Welcome to Microsoft Community.

    Sorry you don't have that option, the week would start on Sunday will end on Saturday.

    We suggest you to give the feedback for it.

    To open Feedback App, type feedback app in search tab and press Enter.

    Keep us posted if you face any issues on windows in future. We will be glad to help you.
     
    Deepak..Raghav, Jan 14, 2016
    #2
  3. How to change "Firs day of week" from Sunday to Monday in Family Saferty setings in windows 10 settings?

    How to change "Firs day of week" from Sunday to Monday in Family Saferty setings in windows 10 settings?
     
    Jaan Tatikas, Jan 14, 2016
    #3
  4. Kari Win User

    How to output day of week to variable in batch

    DATE /T shows the date, not day of the week. You need WMIC command to get the day of the week:

    Code: wmic path win32_localtime get dayofweek[/quote]

    How to output day of week to variable in batch [​IMG]


    The output will be a number from 1 to 7, 1 being either Sunday or Monday depending on what is your local setting, if the first day of the week is Sunday or Monday. In my case, European system and Monday as the first day of the week, the command shown in above screenshot (yellow highlight) gave just now the output (green highlight) as 5 (Friday).
     
Thema:

How to output day of week to variable in batch

Loading...
  1. How to output day of week to variable in batch - Similar Threads - output week variable

  2. Day of week in taskbar

    in Windows 10 Software and Apps
    Day of week in taskbar: Hi there.I wanted the day of the week to be shown in taskbar in Win10. it's working fine when the taskbar is located at the bottom but I located mine at the left side and only time is displated. Is there any way to fix it? Thx....
  3. Day of week in taskbar

    in Windows 10 Customization
    Day of week in taskbar: Hi there.I wanted the day of the week to be shown in taskbar in Win10. it's working fine when the taskbar is located at the bottom but I located mine at the left side and only time is displated. Is there any way to fix it? Thx....
  4. Batch variable-text with distance to margin output?

    in Windows 10 Network and Sharing
    Batch variable-text with distance to margin output?: Hello Together i want to set a user-defined variable that will not display the text on the far left. if you set/p n= hello writes the text is still displayed on the far left Batch variablen-text mit Abstand zum rand ausgeben?
  5. Batch variables are not output?

    in Windows 10 Network and Sharing
    Batch variables are not output?: Hello everybody I have written the following script: @echo off setlocal enableDelayedExpansion :set/p again Z=Number of rows: set/p S=Number of columns: set/a Ze=%Z%+0 set/a Sp=%S%+0 if not %Z%==%Ze% ( cls echo error.. goto again) if %Z%==0 ( echo error... goto again )...
  6. Using variables with the rename command in a batch file

    in Windows 10 Network and Sharing
    Using variables with the rename command in a batch file: Hello, I am trying to use variables in renaming a robocopy log file but I continually receive a 'syntax error'. Everything works perfectly until I use the rename command. I am using the latest build of Windows 10. Any advice will be appreciated, thank you. The batch...
  7. BATch output to file Heeeelp!

    in Windows 10 Support
    BATch output to file Heeeelp!: Win10 - 64 bit Pro. Version 1909. fully up to date, but obviously with KB4524244 uninstalled. *Sad G'day folks. I have a Win .BAT file that I run every day to copy important data from the days doings from the C:\ VRPC to the D:\VRPC. Below is one command line from the BAT...
  8. Show the day of the week?

    in Windows 10 Support
    Show the day of the week?: In the taskbar, how can I make it show the day of the week like [img] ? 126739
  9. How to add day of week in taskbar...

    in Windows 10 Customization
    How to add day of week in taskbar...: Hello. I'm using Windows 10 Home, version 1809, and I got the update a week ago. The day of the week and date used to show in the taskbar right under the time, but no longer. It's gone. I really don't want to drag the taskbar up to widen it. I've tried to add "ddd" to the...
  10. How to display the day of the week in the taskbar?

    in Windows 10 Support
    How to display the day of the week in the taskbar?: On my notebook PC I want to display the day of the week in the taskbar, like this on my desktop PC: [img] Here are the setting that I used: [img] But my notebook PC does not have a "dddd, MMMM dd,yyyy" setting. Only a "dddd, MMMM d,yyyy". How can I show the...