How to use the FORMAT Function with Dates

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 27

  • @JosephArouna
    @JosephArouna 8 ปีที่แล้ว +1

    Hello ! M y name is Joseph Harouna. Thank you for your many tutorials very informative and very useful. I would like to know if it is possible to fill one or more textboxes or comboboxes just by selecting a name in a first combobox. Thank you for giving me the VBA code that I need. Greetings! Joseph Harouna.

    • @Exceltrainingvideos
      @Exceltrainingvideos  8 ปีที่แล้ว

      This link will help: www.exceltrainingvideos.com/tag/create-manage-database-with-user-form/
      Or search www.exceltrainingvideos.com

  • @omarrahim673
    @omarrahim673 2 ปีที่แล้ว

    Sir, I want to calculate the employee’s age based on the date of birth and make TextBox 1 accept writing the date in the form of 1990 and 01/01/1990 and TextBox2 as the result of the calculation using the if function. Thank you

  • @omarrahim673
    @omarrahim673 2 ปีที่แล้ว

    How do we change the textbox2 format like textbox 1 example textbox 1 equals a specific date 01/01/1990 textbox 2 equals today’s date in 08/02/2022 format or textbox 1 equals 1990 textbox 2 equals today’s date in 2022 format Thank you

    • @Exceltrainingvideos
      @Exceltrainingvideos  2 ปีที่แล้ว

      This sample will guide:
      Private Sub CommandButton1_Click()
      TextBox1.Value = Date
      TextBox2.Value = TextBox1.Value
      TextBox2.Value = Format(TextBox2.Value, "dd/mm/yyyy")
      End Sub

  • @adhunikschool
    @adhunikschool 5 ปีที่แล้ว +1

    Sir how can i restrict a column in excel for date entery as DD-MM-YYYY otherwise date not enter in particlar cell and show a msgbox enter date in DD-MM-YYY

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      It's important to note the following when working with dates in Excel:
      1. Date variables display dates based on your system's short date format
      2. Time is displayed also according to your system's format
      3. We can modify our date and time settings via 'Time & Language' options in Windows 10 Settings
      4. We always use the US date formats (mm/dd/yyyy) when we write the VBA code. Therefore, myDate=#11/12/2019# assigns this value to 12th November 2019 and not 11th December 2019 even if your system is set to display dd/mm/yyyy
      5. In fact windows 10 offers only the format dd/mmm/yyyy
      Private Sub Worksheet_Change(ByVal Target As Range)
      Dim ws As Worksheet
      Dim rng As Range
      Set ws = Sheets("Sheet1")
      Set rng = ws.Range("A2:A100")
      For Each c In rng
      If c.Value "" And Not IsDate(c) Then
      c.ClearContents
      MsgBox "Only date entries allowed in this column and the format is dd/mm/yyyy"
      End If
      Next c
      End Sub

  • @cs.mmt9927
    @cs.mmt9927 3 ปีที่แล้ว

    Great Thanks a lot very useful

  • @mdhashmath9353
    @mdhashmath9353 3 ปีที่แล้ว

    Sir i do have a problem with date in user form. When the date is in textbox it's in dd-mm-yyyy format (10-Sep-2021) but when I push the value to sheet it's taking as mm as date dd as month 09 Oct 2021.

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว +1

      Try changing the time and date in your 'region' settings in windows. You can also search my website for a number of solutions to this problem: www.exceltrainingvideos.com/

  • @sanehdeepsingh2526
    @sanehdeepsingh2526 5 ปีที่แล้ว

    Helping video
    I was looking the same
    I have form having 5 date box
    I am facing error 13
    If I leave a blank
    I use one command to ignore this error
    But this time I excel cell having some dummy date automatically
    How to solve this

    • @Exceltrainingvideos
      @Exceltrainingvideos  5 ปีที่แล้ว

      This link will guide: www.exceltrainingvideos.com/format-function-with-dates-vba/

  • @chillaleleeladhar1908
    @chillaleleeladhar1908 4 ปีที่แล้ว

    Sir, I sm using vb6. 0. I am entering time (hh:mm) in one Text box and in another text box I am entering (mm) to be increment. I want to add the mm and display.

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว +1

      You want to display the total minutes or just the new time?

    • @chillaleleeladhar1908
      @chillaleleeladhar1908 4 ปีที่แล้ว

      @@Exceltrainingvideos just new time, ex entered time is 12:30, incremenr 15 min. Result should be 12:30, 12:45, 01:00, 01:15

    • @Exceltrainingvideos
      @Exceltrainingvideos  4 ปีที่แล้ว

      Can you give an example of a situation where this could be useful?

    • @chillaleleeladhar1908
      @chillaleleeladhar1908 4 ปีที่แล้ว

      @@Exceltrainingvideos in preplanned production for taggiing after process on each item.

    • @chillaleleeladhar1908
      @chillaleleeladhar1908 4 ปีที่แล้ว

      @@Exceltrainingvideos just new time

  • @udaypratapsingh9967
    @udaypratapsingh9967 8 ปีที่แล้ว

    Good one sir

  • @MohAboAbdo
    @MohAboAbdo 5 ปีที่แล้ว

    Thanks ... Thanks.

  • @omarrahim673
    @omarrahim673 2 ปีที่แล้ว

    Waiting for a solution dear sir

  • @sahebraophalke6986
    @sahebraophalke6986 2 ปีที่แล้ว

    नमस्ते सर, मैने एक पेमेंट और receipt user फॉर्म बनाय है, मै 3 अलग अलग बँक बुक और कॅश बुक maintain करणा चाहता हू, मैं 3 अलग अलग बँक use करता हूं, example जब मैं first सिलेक्ट करू तो xl sheet1 मे डेटा ट्रान्सफर हो, और second & third bank सिलेक्ट करू तो sheet2 और sheet3 मे डेटा ट्रान्सफर हो, और cash के लिए sheet4,,,,,,, कृपया हेल्प किजीए..... श्री फलके

  • @sahebraophalke6986
    @sahebraophalke6986 3 ปีที่แล้ว

    नमस्ते सर, मैने युजर फॉर्म मे डेट टेक्स्ट बॉक्स के लिये userform initialize मे txtdate= formate(date,"dd-mmm-yyyy") कोड युझ किया है, और यह ठिकसे वर्क होता है, लेकीन जब मै कोई एन्ट्री अपडेट करणेकेलीये लिस्टबॉक्स से युजरफॉर्म मे कॉल करता हु तो वहा Date Textbox मे कुछ संख्या आती है, तो इसे update करते समय कैसे Date format मे लाया जा सकता हैं

    • @Exceltrainingvideos
      @Exceltrainingvideos  3 ปีที่แล้ว

      Private Sub ListBox1_Click()
      TextBox1 = ListBox1.Value
      TextBox1 = Format(TextBox1, "dd-mmm-yyyy")
      End Sub
      Please share my TH-cam channel on Excel with all your friends.
      मेरा चैनल अपने सब मित्रों के साथ शेयर करें. धन्यवाद

  • @recessiontwentytwenty3858
    @recessiontwentytwenty3858 5 ปีที่แล้ว

    Crazy crazy crazy