やじゅ@アプリケーション・ラボ わんくま支局

目次

Blog 利用状況

ニュース

プロフィール

MSMVP

Windowsバッチで日付計算を簡単に行う

これは、Visual Basic Advent Calendar 2015の12/1日の記事。

現在、会社では運用チームに属しています。
バッチファイルやVBScriptを使って導入作業やバックアップなどの仕組みを作ることが増えました。

バッチコマンドで日付計算する処理を作ろうとすると結構面倒です。VBScriptではDateAdd関数の1ステートメントで済むのに。
ネットで検索して出てくる処理も思っているより長く書かれているので組み込むのは躊躇してしまいまいます。
そんな中でもいい方法を提示していたのを見つけました。

バッチファイルで昨日の日付を取得
http://oshiete.goo.ne.jp/qa/3597882.html

日付時刻計算はVBScriptを使ってしまうのが楽です。
echo WScript.Echo DateAdd("d",-1,Date()) > tmp.vbs
for /f "tokens=1-3 delims=/-" %%A in ('cscript //nologo tmp.vbs') do set ANS=%%A%%B%%C
del tmp.vbs

なるほどね。一時的にVBScriptを作成し計算結果を取得してしまうと。
これなら日付処理に関わらず応用がいろいろ出来そうです。

投稿日時 : 2015年12月1日 2:02

コメントを追加

# stromectol over the counter http://stromectolabc.com/
stromectol 3 mg dosage 2022/02/07 17:36 Busjdhj

stromectol over the counter http://stromectolabc.com/
stromectol 3 mg dosage

# buy stromectol canada http://stromectolabc.com/
stromectol prices 2022/02/08 3:33 Busjdhj

buy stromectol canada http://stromectolabc.com/
stromectol prices

# ivermectin tablets http://stromectolabc.com/
stromectol online canada 2022/02/08 10:19 Busjdhj

ivermectin tablets http://stromectolabc.com/
stromectol online canada

# buy cheap doxycycline https://doxycyline1st.com/
doxycycline 100 mg 2022/02/25 22:18 Doxycycline

buy cheap doxycycline https://doxycyline1st.com/
doxycycline 100 mg

# SUAMvXoPldrrcsMpDYx 2022/04/19 12:02 johnansaz

http://imrdsoacha.gov.co/silvitra-120mg-qrms

# _ 2022/10/13 5:14 hxtkwu@livedoor.com

新品の財布の
●株式情報はいつでも更新します!
◆品質が良くて、は価格が、実物の写真が低いです!
◆経営方針:品質を重視して、納期も厳守して、第1を使いを信じます!
◆超とりわけ安い価格で、安心して、迅速で、確かで、顧客の身辺まで(に)引き渡します。
豊富な商品でそろってい最も新作もいつでも商品が到着してゆっくりと見てくださいのためです。
広大な客がご光臨賜りを歓迎します
_ https://www.gooshop001.com/product/detail/91.htm

# chloroquine 500 mg 2022/12/26 12:17 MorrisReaks

http://www.hydroxychloroquinex.com/# chloroquine online canada

# hydroxychloroquine buy online 2022/12/26 18:01 MorrisReaks

http://www.hydroxychloroquinex.com/# hydroxychloroquine online sale

# aralen otc 2022/12/28 1:53 MorrisReaks

https://www.hydroxychloroquinex.com/ plaquenil online

# Its such as you read my mind! You appear to understand a lot approximately this, like you wrote the ebook in it or something. I think that you can do with some % to force the message house a little bit, but other than that, this is excellent blog. A fant 2023/01/13 22:33 Its such as you read my mind! You appear to unders

Its such as you read my mind! You appear to understand a
lot approximately this, like you wrote the ebook in it or something.

I think that you can do with some % to force the message house
a little bit, but other than that, this is excellent blog.
A fantastic read. I will certainly be back.

# What side effects can this medication cause? Get here.
https://edonlinefast.com
Read now. Read information now. 2023/02/17 11:09 EdOnline

What side effects can this medication cause? Get here.
https://edonlinefast.com
Read now. Read information now.

# It's remarkable to pay a quick visit this web page and reading the views of all friends concerning this paragraph, whil I am also zralous of getting know-how. 2023/04/03 13:41 It's remarkable to pay a quick visit this web page

It's remarkable to pay a quick visit this web page
and reading the views off alll friends concerning this
paragraph, wile I amm also zealous of geetting know-how.

# ed meds online without doctor prescription - https://cheapdr.top/# 2023/04/03 15:34 Dikolipo

ed meds online without doctor prescription - https://cheapdr.top/#

# prednisone in mexico - https://prednisonesale.pro/# 2023/04/22 15:19 Prednisone

prednisone in mexico - https://prednisonesale.pro/#

# Abortion pills online - https://cytotecsale.pro/# 2023/04/29 4:48 Cytotec

Abortion pills online - https://cytotecsale.pro/#

# canada meds https://pillswithoutprescription.pro/# 2023/05/16 9:41 PillsPro

canada meds https://pillswithoutprescription.pro/#

# prednisone buying https://prednisonepills.pro/# - purchase prednisone from india 2023/06/05 5:25 Prednisone

prednisone buying https://prednisonepills.pro/# - purchase prednisone from india

# paxlovid covid https://paxlovid.life/# paxlovid cost without insurance 2023/07/26 6:25 Paxlovid

paxlovid covid https://paxlovid.life/# paxlovid cost without insurance

# mens ed pills https://edpills.ink/# - best ed treatment pills 2023/07/27 0:58 EdPills

mens ed pills https://edpills.ink/# - best ed treatment pills

# Флотореагенты - это химические соединения, позволяющие извлекать компоненты при очистке растворов и воды и проводить флотацию руд. 2023/09/27 9:46 Флотореагенты - это химические соединения, позвол

Флотореагенты - это химические соединения,
позволяющие извлекать компоненты при очистке
растворов и воды и проводить флотацию руд.

# Флотореагенты - это химические соединения, позволяющие извлекать компоненты при очистке растворов и воды и проводить флотацию руд. 2023/09/27 9:46 Флотореагенты - это химические соединения, позвол

Флотореагенты - это химические соединения,
позволяющие извлекать компоненты при очистке
растворов и воды и проводить флотацию руд.

# Флотореагенты - это химические соединения, позволяющие извлекать компоненты при очистке растворов и воды и проводить флотацию руд. 2023/09/27 9:48 Флотореагенты - это химические соединения, позвол

Флотореагенты - это химические соединения,
позволяющие извлекать компоненты при очистке
растворов и воды и проводить флотацию руд.

# Флотореагенты - это химические соединения, позволяющие извлекать компоненты при очистке растворов и воды и проводить флотацию руд. 2023/09/27 9:50 Флотореагенты - это химические соединения, позвол

Флотореагенты - это химические соединения,
позволяющие извлекать компоненты при очистке
растворов и воды и проводить флотацию руд.

# ï»¿erectile dysfunction medication https://edpillsotc.store/# - ed pills online 2023/10/08 1:18 EdPills

erectile dysfunction medication https://edpillsotc.store/# - ed pills online

# plavix best price https://plavix.guru/ cheap plavix antiplatelet drug 2023/10/24 0:49 Plavixxx

plavix best price https://plavix.guru/ cheap plavix antiplatelet drug

# doxycycline hyc https://doxycycline.forum/ order doxycycline online 2023/11/25 13:19 Doxycycline

doxycycline hyc https://doxycycline.forum/ order doxycycline online

# acquisto farmaci con ricetta https://farmaciait.pro/ farmacia online senza ricetta 2023/12/04 10:17 Farmacia

acquisto farmaci con ricetta https://farmaciait.pro/ farmacia online senza ricetta

# men's ed pills https://edpills.tech/# natural ed medications 2023/12/23 8:17 EdPills

men's ed pills https://edpills.tech/# natural ed medications

# Great post. I used to be checking constantly this blog and I'm inspired! Very useful info specifically the closing phase :) I maintain such info a lot. I was looking for this particular information for a very long time. Thanks and good luck. 2024/04/02 19:00 Great post. I used to be checking constantly this

Great post. I used to be checking constantly this blog and I'm inspired!
Very useful info specifically the closing phase :) I maintain such
info a lot. I was looking for this particular information for a very long time.

Thanks and good luck.

# I love what you guys are up too. This kind of clever work and exposure! Keep up the awesome works guys I've added you guys to my blogroll. 2024/04/02 23:09 I love what you guys are up too. This kind of clev

I love what you guys are up too. This kind of clever work and exposure!
Keep up the awesome works guys I've added you
guys to my blogroll.

# I love what you guys are up too. This kind of clever work and exposure! Keep up the awesome works guys I've added you guys to my blogroll. 2024/04/02 23:09 I love what you guys are up too. This kind of clev

I love what you guys are up too. This kind of clever work and exposure!
Keep up the awesome works guys I've added you
guys to my blogroll.

# I love what you guys are up too. This kind of clever work and exposure! Keep up the awesome works guys I've added you guys to my blogroll. 2024/04/02 23:10 I love what you guys are up too. This kind of clev

I love what you guys are up too. This kind of clever work and exposure!
Keep up the awesome works guys I've added you
guys to my blogroll.

# I love what you guys are up too. This kind of clever work and exposure! Keep up the awesome works guys I've added you guys to my blogroll. 2024/04/02 23:11 I love what you guys are up too. This kind of clev

I love what you guys are up too. This kind of clever work and exposure!
Keep up the awesome works guys I've added you
guys to my blogroll.

# Hi my family member! I wish to say that this article is awesome, great written and include almost all vital infos. I'd like to peer extra posts like this . 2024/04/03 5:33 Hi my family member! I wish to say that this artic

Hi my family member! I wish to say that this article is awesome, great written and include almost all vital infos.

I'd like to peer extra posts like this .

# Supercharge Your SEO with Our Premium Databases! 2024/04/21 5:19 Bryantiz

Supercharge Your SEO with Our Premium Databases!
Want to improve your SEO rankings and save time? Our premium databases for XRumer and GSA Search Engine Ranker are just what you need!

What do our databases include?
? Active links: Get access to constantly updated lists of active links from profiles, posts, forums, guestbooks, blogs, and more. No more wasting time on dead links!
? Verified and identified links: Our premium databases for GSA Search Engine Ranker include verified and identified links, categorized by search engines. This means you get the highest quality links that will help you rank higher.
? Monthly updates: All of our databases are updated monthly to ensure you have the most fresh and effective links.

Choose the right option for you:
? XRumer Database:
o Premium database with free updates: $119
o Premium database without updates: $38

? Fresh XRumer Database:
o Fresh database with free updates: $94
o Fresh database without updates: $25

? GSA Search Engine Ranker Verified Links:
o GSA Search Engine Ranker activation key: $65 (includes database)
o Fresh database with free updates: $119
o Fresh database without updates: $38

Don't waste time on outdated or inactive links. Invest in our premium databases and start seeing results today!
Order now!
P.S. By purchasing GSA Search Engine Ranker from us, you get a high-quality product at a competitive price. Save your resources and start improving your SEO rankings today!
To contact us, write to telegram https://t.me/DropDeadStudio

タイトル
名前
URL
コメント