עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

תאריכים ב vb.net

Featured Replies

פורסם

איך כותבים את הדברים הבאים:

לשלוף תאריך מטקסט-בוקס (dd/mm/yyyy) לתוך משתנה

להוסיף 10 חודשים לתאריך

לשלוף את השנה בלבד ולהפוך אותה ל int

לשלוף את החודש בלבד ולהפוך אותו ל int

פורסם
  • מחבר

קראתי תודה

עם זאת לא הבנתי איך לשלוף תאריך מטקסט-בוקס (dd/mm/yyyy) לתוך משתנה

פורסם

כל זה כתוב בלינק שקיבלת:

By parsing the string representation of a date and time value. The Parse, ParseExact, TryParse, and TryParseExact methods all convert a string to its equivalent date and time value. The following example uses the Parse method to parse a string and convert it to a DateTime value.

Dim dateString As String = "5/1/2008 8:30:52 AM"
Dim date1 As Date = Date.Parse(dateString, CultureInfo.InvariantCulture)

יש לך textbox, יש לו שדה מסוג string. בדיוק כמו בדוגמא.

פורסם
  • מחבר

אוקי

הבעייה שהטקסט בוקס בדוגמה של msdn הוא בפורמט mm/dd/yyyy ואילו בטקסט-בוקס שלי אני משתמש בפורמט ההפוך dd/mm/yyyy

פורסם

אז בשביל זה יש את הגרסה האחרת ל-parse

http://msdn.microsoft.com/en-us/library/kc8s65zs.aspx

שבה אתה מעביר אובייקט שקובע איך נראה תאריך. יש שם כמה דוגמאות, איך משתמשים בתאריכים אמריקאיים (en-US) ובתאריכים ישראליים (he-IL).

אופציה שנייה היא לתת לו את הפורמט ידנית, באמצעות ParseExact

http://msdn.microsoft.com/en-us/library/w2sa9yss.aspx

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.